# Tangent

Grammar — Tan(a)
FlagsNative | Function

Returns the tangent of an angle. The angle should be specified in degrees.

# Arguments

  • fixed — Angle

Returns — fixed

native fixed Tan(fixed degrees);

Category: Math / Trigonometry

# Examples

mods/novastoryassets.sc2modbase.sc2maps/maps/campaign/nova/nova02.sc2map/MapScript.galaxy:4744


        lv_validTargets = UnitGroupEmpty();
        lv_m = Tan((PointGetFacing(lv_targetWaypoints[lv_targetWaypointIndex]) + 90.0));
        lv_b = (PointGetY(UnitGroupCenterOfGroup(lv_waveGroup))-(lv_m*PointGetX(UnitGroupCenterOfGroup(lv_waveGroup))));
        auto2433F59F_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", lv_attackWavePlayer, c_unitAllianceEnemy, RegionCircle(UnitGroupCenterOfGroup(lv_waveGroup), 15.0), UnitFilter((1 << c_targetFilterGround) | (1 << c_targetFilterVisible), 0, (1 << c_targetFilterMissile) | (1 << c_targetFilterUncommandable), (1 << (c_targetFilterStasis - 32)) | (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32)) | (1 << (c_targetFilterInvulnerable - 32))), 0);

mods/novastoryassets.sc2mod/base.sc2maps/maps/campaign/nova/nova02.sc2mapMapScript.galaxy:4744


        lv_validTargets = UnitGroupEmpty();
        lv_m = Tan((PointGetFacing(lv_targetWaypoints[lv_targetWaypointIndex]) + 90.0));
        lv_b = (PointGetY(UnitGroupCenterOfGroup(lv_waveGroup))-(lv_m*PointGetX(UnitGroupCenterOfGroup(lv_waveGroup))));
        auto2433F59F_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", lv_attackWavePlayer, c_unitAllianceEnemy, RegionCircle(UnitGroupCenterOfGroup(lv_waveGroup), 15.0), UnitFilter((1 << c_targetFilterGround) | (1 << c_targetFilterVisible), 0, (1 << c_targetFilterMissile) | (1 << c_targetFilterUncommandable), (1 << (c_targetFilterStasis - 32)) | (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32)) | (1 << (c_targetFilterInvulnerable - 32))), 0);