# Cosine
Grammar — Cos(a)
Flags —Native
|Function
Returns the cosine of an angle. The angle should be specified in degrees.
# Arguments
fixed
— Angle
Returns — fixed
native fixed Cos(fixed degrees);
# Related
Category: Math / Trigonometry
- Sine —
fixed
— Sin - Cosine —
fixed
— Cos - Tangent —
fixed
— Tan - Arcsine —
fixed
— ASin - Arccosine —
fixed
— ACos - Arctangent From Deltas —
fixed
— ATan2 - Arctangent From Value —
fixed
— ATan
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:7035
lv_alpha = AngleBetweenPoints(Point(0.0, 0.0), Point(lv_x, lv_y));
lv_distance = DistanceBetweenPoints(Point(0.0, 0.0), Point(lv_x, lv_y));
lv_posTarget = Point(((lv_distance * Cos((lv_alpha + lv_angle))) + PointGetX(lv_posSpawn)), ((lv_distance * Sin((lv_alpha + lv_angle))) + PointGetY(lv_posSpawn)));
libNtve_gf_MakeUnitFacePoint(lv_plane, lv_posTarget, 0.0625);
UnitSetPosition(lv_plane, lv_posTarget, true);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttychus02.sc2map/MapScript.galaxy:2360
lv_d = DistanceBetweenPoints(lv_a, lv_b);
lv_di = FixedToInt((lv_d / 5.0));
lv_x = (PointGetX(lv_a) + (Cos(lv_facing) * 5.0));
lv_y = (PointGetY(lv_a) + (Sin(lv_facing) * 5.0));
gv_soundRegion = RegionCircle(Point(lv_x, lv_y), 1.0);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttychus02.sc2map/MapScript.galaxy:2366
lv_i = 1;
for ( ; ( (auto04D15821_ai >= 0 && lv_i <= auto04D15821_ae) || (auto04D15821_ai < 0 && lv_i >= auto04D15821_ae) ) ; lv_i += auto04D15821_ai ) {
lv_x = (PointGetX(lv_a) + (Cos(lv_facing) * (IntToFixed(lv_i) * 5.0)));
lv_y = (PointGetY(lv_a) + (Sin(lv_facing) * (IntToFixed(lv_i) * 5.0)));
RegionAddCircle(gv_soundRegion, true, Point(lv_x, lv_y), 3.0);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:7035
lv_alpha = AngleBetweenPoints(Point(0.0, 0.0), Point(lv_x, lv_y));
lv_distance = DistanceBetweenPoints(Point(0.0, 0.0), Point(lv_x, lv_y));
lv_posTarget = Point(((lv_distance * Cos((lv_alpha + lv_angle))) + PointGetX(lv_posSpawn)), ((lv_distance * Sin((lv_alpha + lv_angle))) + PointGetY(lv_posSpawn)));
libNtve_gf_MakeUnitFacePoint(lv_plane, lv_posTarget, 0.0625);
UnitSetPosition(lv_plane, lv_posTarget, true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus02.sc2map — MapScript.galaxy:2360
lv_d = DistanceBetweenPoints(lv_a, lv_b);
lv_di = FixedToInt((lv_d / 5.0));
lv_x = (PointGetX(lv_a) + (Cos(lv_facing) * 5.0));
lv_y = (PointGetY(lv_a) + (Sin(lv_facing) * 5.0));
gv_soundRegion = RegionCircle(Point(lv_x, lv_y), 1.0);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus02.sc2map — MapScript.galaxy:2366
lv_i = 1;
for ( ; ( (auto04D15821_ai >= 0 && lv_i <= auto04D15821_ae) || (auto04D15821_ai < 0 && lv_i >= auto04D15821_ae) ) ; lv_i += auto04D15821_ai ) {
lv_x = (PointGetX(lv_a) + (Cos(lv_facing) * (IntToFixed(lv_i) * 5.0)));
lv_y = (PointGetY(lv_a) + (Sin(lv_facing) * (IntToFixed(lv_i) * 5.0)));
RegionAddCircle(gv_soundRegion, true, Point(lv_x, lv_y), 3.0);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid03.sc2map/MapScript.galaxy:1855
ActorScopeKill(ActorScopeFromActor(gv_kerriganSoundRegionActor));
Wait(0.0625, c_timeGame);
lv_x = (PointGetX(lv_a) + (Cos(lv_facing) * 5.0));
lv_y = (PointGetY(lv_a) + (Sin(lv_facing) * 5.0));
gv_kerriganSoundRegion = RegionCircle(Point(lv_x, lv_y), 1.0);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid03.sc2map/MapScript.galaxy:1862
lv_i = 1;
for ( ; ( (autoA1C900F0_ai >= 0 && lv_i <= autoA1C900F0_ae) || (autoA1C900F0_ai < 0 && lv_i >= autoA1C900F0_ae) ) ; lv_i += autoA1C900F0_ai ) {
lv_x = (PointGetX(lv_a) + (Cos(lv_facing) * (IntToFixed(lv_i) * 5.0)));
lv_y = (PointGetY(lv_a) + (Sin(lv_facing) * (IntToFixed(lv_i) * 5.0)));
RegionAddCircle(gv_kerriganSoundRegion, true, Point(lv_x, lv_y), 3.0);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid03.sc2map/MapScript.galaxy:1921
ActorScopeKill(ActorScopeFromActor(gv_narudSoundRegionActor));
Wait(0.0625, c_timeGame);
lv_x = (PointGetX(lv_a) + (Cos(lv_facing) * 5.0));
lv_y = (PointGetY(lv_a) + (Sin(lv_facing) * 5.0));
gv_narudSoundRegion = RegionCircle(Point(lv_x, lv_y), 1.0);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zhybrid03.sc2map/MapScript.galaxy:1928
lv_i = 1;
for ( ; ( (auto053EBF50_ai >= 0 && lv_i <= auto053EBF50_ae) || (auto053EBF50_ai < 0 && lv_i >= auto053EBF50_ae) ) ; lv_i += auto053EBF50_ai ) {
lv_x = (PointGetX(lv_a) + (Cos(lv_facing) * (IntToFixed(lv_i) * 5.0)));
lv_y = (PointGetY(lv_a) + (Sin(lv_facing) * (IntToFixed(lv_i) * 5.0)));
RegionAddCircle(gv_narudSoundRegion, true, Point(lv_x, lv_y), 3.0);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid03.sc2map — MapScript.galaxy:1855
ActorScopeKill(ActorScopeFromActor(gv_kerriganSoundRegionActor));
Wait(0.0625, c_timeGame);
lv_x = (PointGetX(lv_a) + (Cos(lv_facing) * 5.0));
lv_y = (PointGetY(lv_a) + (Sin(lv_facing) * 5.0));
gv_kerriganSoundRegion = RegionCircle(Point(lv_x, lv_y), 1.0);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid03.sc2map — MapScript.galaxy:1862
lv_i = 1;
for ( ; ( (autoA1C900F0_ai >= 0 && lv_i <= autoA1C900F0_ae) || (autoA1C900F0_ai < 0 && lv_i >= autoA1C900F0_ae) ) ; lv_i += autoA1C900F0_ai ) {
lv_x = (PointGetX(lv_a) + (Cos(lv_facing) * (IntToFixed(lv_i) * 5.0)));
lv_y = (PointGetY(lv_a) + (Sin(lv_facing) * (IntToFixed(lv_i) * 5.0)));
RegionAddCircle(gv_kerriganSoundRegion, true, Point(lv_x, lv_y), 3.0);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid03.sc2map — MapScript.galaxy:1921
ActorScopeKill(ActorScopeFromActor(gv_narudSoundRegionActor));
Wait(0.0625, c_timeGame);
lv_x = (PointGetX(lv_a) + (Cos(lv_facing) * 5.0));
lv_y = (PointGetY(lv_a) + (Sin(lv_facing) * 5.0));
gv_narudSoundRegion = RegionCircle(Point(lv_x, lv_y), 1.0);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid03.sc2map — MapScript.galaxy:1928
lv_i = 1;
for ( ; ( (auto053EBF50_ai >= 0 && lv_i <= auto053EBF50_ae) || (auto053EBF50_ai < 0 && lv_i >= auto053EBF50_ae) ) ; lv_i += auto053EBF50_ai ) {
lv_x = (PointGetX(lv_a) + (Cos(lv_facing) * (IntToFixed(lv_i) * 5.0)));
lv_y = (PointGetY(lv_a) + (Sin(lv_facing) * (IntToFixed(lv_i) * 5.0)));
RegionAddCircle(gv_narudSoundRegion, true, Point(lv_x, lv_y), 3.0);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/sc2epilogue02.sc2map/MapScript.galaxy:3842
lv_d = DistanceBetweenPoints(lv_a, lv_b);
lv_di = FixedToInt((lv_d / 5.0));
lv_x = (PointGetX(lv_a) + (Cos(lv_facing) * 5.0));
lv_y = (PointGetY(lv_a) + (Sin(lv_facing) * 5.0));
gv_soundRegion = RegionCircle(Point(lv_x, lv_y), 1.0);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/sc2epilogue02.sc2map/MapScript.galaxy:3848
lv_i = 1;
for ( ; ( (auto6B813145_ai >= 0 && lv_i <= auto6B813145_ae) || (auto6B813145_ai < 0 && lv_i >= auto6B813145_ae) ) ; lv_i += auto6B813145_ai ) {
lv_x = (PointGetX(lv_a) + (Cos(lv_facing) * (IntToFixed(lv_i) * 5.0)));
lv_y = (PointGetY(lv_a) + (Sin(lv_facing) * (IntToFixed(lv_i) * 5.0)));
RegionAddCircle(gv_soundRegion, true, Point(lv_x, lv_y), 3.0);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/sc2epilogue03.sc2map/MapScript.galaxy:561
// Implementation
lv_normalizedCurrentAngle = gf_NormalizeVoidCrystalAngle(lp_index, lp_currentAngle);
return ((gv_voidCrystals[lp_index].lv_majorRadius * gv_voidCrystals[lp_index].lv_minorRadius) / SquareRoot((Pow((gv_voidCrystals[lp_index].lv_minorRadius * Cos(lv_normalizedCurrentAngle)), 2.0) + Pow((gv_voidCrystals[lp_index].lv_majorRadius * Sin(lv_normalizedCurrentAngle)), 2.0))));
}
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/sc2epilogue03.sc2map/MapScript.galaxy:2116
lv_sideC = DistanceBetweenPoints(gv_voidCrystals[lv_index].lv_center, gv_voidCrystals[lv_index].lv_zenith);
lv_angleB = ACos((((lv_sideA*lv_sideA)+(lv_sideC*lv_sideC)-(lv_sideB*lv_sideB))/(2*lv_sideA*lv_sideC)));
gv_voidCrystals[lv_index].lv_minorRadius = (((lv_sideA * lv_sideC) * Sin(lv_angleB)) / SquareRoot((Pow(lv_sideC, 2.0) - Pow((lv_sideA * Cos(lv_angleB)), 2.0))));
if ((gv_voidCrystals[lv_index].lv_rotatesCounterClockwise == true)) {
auto0413FD7D_ae = (360.0 + gv_voidCrystals[lv_index].lv_rotation);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/sc2epilogue02.sc2map — MapScript.galaxy:3842
lv_d = DistanceBetweenPoints(lv_a, lv_b);
lv_di = FixedToInt((lv_d / 5.0));
lv_x = (PointGetX(lv_a) + (Cos(lv_facing) * 5.0));
lv_y = (PointGetY(lv_a) + (Sin(lv_facing) * 5.0));
gv_soundRegion = RegionCircle(Point(lv_x, lv_y), 1.0);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/sc2epilogue02.sc2map — MapScript.galaxy:3848
lv_i = 1;
for ( ; ( (auto6B813145_ai >= 0 && lv_i <= auto6B813145_ae) || (auto6B813145_ai < 0 && lv_i >= auto6B813145_ae) ) ; lv_i += auto6B813145_ai ) {
lv_x = (PointGetX(lv_a) + (Cos(lv_facing) * (IntToFixed(lv_i) * 5.0)));
lv_y = (PointGetY(lv_a) + (Sin(lv_facing) * (IntToFixed(lv_i) * 5.0)));
RegionAddCircle(gv_soundRegion, true, Point(lv_x, lv_y), 3.0);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/sc2epilogue03.sc2map — MapScript.galaxy:561
// Implementation
lv_normalizedCurrentAngle = gf_NormalizeVoidCrystalAngle(lp_index, lp_currentAngle);
return ((gv_voidCrystals[lp_index].lv_majorRadius * gv_voidCrystals[lp_index].lv_minorRadius) / SquareRoot((Pow((gv_voidCrystals[lp_index].lv_minorRadius * Cos(lv_normalizedCurrentAngle)), 2.0) + Pow((gv_voidCrystals[lp_index].lv_majorRadius * Sin(lv_normalizedCurrentAngle)), 2.0))));
}
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/sc2epilogue03.sc2map — MapScript.galaxy:2116
lv_sideC = DistanceBetweenPoints(gv_voidCrystals[lv_index].lv_center, gv_voidCrystals[lv_index].lv_zenith);
lv_angleB = ACos((((lv_sideA*lv_sideA)+(lv_sideC*lv_sideC)-(lv_sideB*lv_sideB))/(2*lv_sideA*lv_sideC)));
gv_voidCrystals[lv_index].lv_minorRadius = (((lv_sideA * lv_sideC) * Sin(lv_angleB)) / SquareRoot((Pow(lv_sideC, 2.0) - Pow((lv_sideA * Cos(lv_angleB)), 2.0))));
if ((gv_voidCrystals[lv_index].lv_rotatesCounterClockwise == true)) {
auto0413FD7D_ae = (360.0 + gv_voidCrystals[lv_index].lv_rotation);
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:4832
lv_cameraPosition[0] = PointGetX(CameraGetTarget(1));
lv_cameraPosition[1] = (PointGetY(CameraGetTarget(1))-(Cos(CameraGetPitch(1))*CameraGetDistance(1)));
lv_cameraPosition[2] = (WorldHeight(c_heightMapGround, CameraGetTarget(1))+(Sin(CameraGetPitch(1))*CameraGetDistance(1)));
lv_effectPosition[0] = PointGetX(EventPlayerEffectUsedPoint(c_effectLocationTargetPoint));
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:5978
lv_xPartial = (Sin(lv_r) * lv_xDistance);
lv_yPartial = (Sin(lv_r) * lv_yDistance);
lv_zPartial = (Cos(lv_r) * lv_zTotal);
UnitSetPosition(lv_kerriganStrikeAmon, Point((PointGetX(UnitGetPosition(lv_kerriganOriginalUnit)) + lv_xPartial), (PointGetY(UnitGetPosition(lv_kerriganOriginalUnit)) + lv_yPartial)), true);
UnitSetHeight(lv_kerriganStrikeAmon, (-45.0 + (lv_zPartial + 0.0)), 0.0625);
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:6006
lv_xPartial = (Sin(lv_r) * lv_xDistance);
lv_yPartial = (Sin(lv_r) * lv_yDistance);
lv_zPartial = (Cos(lv_r) * lv_zTotal);
UnitSetPosition(lv_kerriganStrikeAmon, Point((PointGetX(UnitGetPosition(lv_kerriganOriginalUnit)) + lv_xPartial), (PointGetY(UnitGetPosition(lv_kerriganOriginalUnit)) + lv_yPartial)), true);
UnitSetHeight(lv_kerriganStrikeAmon, (-45.0 + (lv_zPartial + 0.0)), 0.0625);
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:1246
// Automatic Variable Declarations
// Implementation
ActorSend(lp_model, libNtve_gf_SetRotation(Cos(lp_angle), Sin(lp_angle), 0, 0, 0, 1.0));
}
mods/core.stormmod — base.stormdata/TriggerLibs/NativeLib.galaxy:1142
// Automatic Variable Declarations
// Implementation
ActorSend(lp_model, libNtve_gf_SetRotation(Cos(lp_angle), Sin(lp_angle), 0, 0, 0, 1.0));
}
mods/heroesbrawlmods/brawlmapmods/coop/pvebrawlmod.stormmod — base.stormdata/LibPVEB.galaxy:1508
lv_offset = AbsF((lv_distanceUnitPre * Sin((lv_angelUnit - lv_angelLane))));
if ((lv_offset >= libPVEB_gv_pvEWaveLeashDistance_On_C)) {
lv_ptAnchor = PointWithOffsetPolar(lv_ptPre, AbsF((lv_distanceUnitPre * Cos((lv_angelUnit - lv_angelLane)))), lv_angelLane);
UnitIssueOrder(lv_itUnit, OrderTargetingPoint(AbilityCommand("move", 0), lv_ptAnchor), c_orderQueueReplace);
UnitGroupAdd(libPVEB_gv_pvEWaves[lp_waveIndex].lv_unitsLeashing, lv_itUnit);
mods/heroesbrawlmods/brawlmapmods/coop/pvemod.stormmod — base.stormdata/LibPVEM.galaxy:179
lv_offset = AbsF((lv_distanceUnitPre * Sin((lv_angelUnit - lv_angelLane))));
if ((lv_offset >= libPVEM_gv_pvEAttackWaveLeashDistance_On_C)) {
lv_ptAnchor = PointWithOffsetPolar(lv_ptPre, AbsF((lv_distanceUnitPre * Cos((lv_angelUnit - lv_angelLane)))), lv_angelLane);
UnitIssueOrder(lv_itUnit, OrderTargetingPoint(AbilityCommand("move", 0), lv_ptAnchor), c_orderQueueReplace);
UnitGroupAdd(libPVEM_gv_pvEAttackWaves[lp_waveIndex].lv_unitsLeashing, lv_itUnit);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:263
lv_targetYToEdgeOfMap = (PointGetY(RegionGetBoundsMax(RegionPlayableMap())) - PointGetY(lv_targetPoint));
lv_targetAngle = AngleBetweenPoints(lv_casterPoint, lv_targetPoint);
lv_cosineofTargetAngle = Cos(lv_targetAngle);
if ((lv_cosineofTargetAngle > -0.001) && (lv_cosineofTargetAngle < 0.001)) {
lv_abilityTargetPoint = Point(PointGetX(lv_targetPoint), PointGetY(RegionGetBoundsMax(RegionPlayableMap())));
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:268
}
else {
lv_triangle1C = (lv_targetXToEdgeOfMap / Cos(lv_targetAngle));
lv_targetAngle = (90.0 - lv_targetAngle);
lv_cosineofTargetAngle = Cos(lv_targetAngle);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:270
lv_triangle1C = (lv_targetXToEdgeOfMap / Cos(lv_targetAngle));
lv_targetAngle = (90.0 - lv_targetAngle);
lv_cosineofTargetAngle = Cos(lv_targetAngle);
if ((lv_cosineofTargetAngle > -0.001) && (lv_cosineofTargetAngle < 0.001)) {
lv_abilityTargetPoint = Point(PointGetX(RegionGetBoundsMax(RegionPlayableMap())), PointGetY(lv_targetPoint));
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:275
}
else {
lv_triangle2C = (lv_targetYToEdgeOfMap / Cos(lv_targetAngle));
if ((lv_triangle1C < lv_triangle2C)) {
lv_abilityTargetPoint = libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint, (lv_triangle1C * -1.0), lv_casterPoint);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:289
lv_targetYToEdgeOfMap = (PointGetY(RegionGetBoundsMax(RegionPlayableMap())) - PointGetY(lv_targetPoint));
lv_targetAngle = (AngleBetweenPoints(lv_casterPoint, lv_targetPoint) - 90.0);
lv_cosineofTargetAngle = Cos(lv_targetAngle);
if ((lv_cosineofTargetAngle > -0.001) && (lv_cosineofTargetAngle < 0.001)) {
lv_abilityTargetPoint = Point(PointGetX(RegionGetBoundsMin(RegionPlayableMap())), PointGetY(lv_targetPoint));
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:294
}
else {
lv_triangle1C = (lv_targetYToEdgeOfMap / Cos(lv_targetAngle));
lv_targetAngle = (90.0 - lv_targetAngle);
lv_cosineofTargetAngle = Cos(lv_targetAngle);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:296
lv_triangle1C = (lv_targetYToEdgeOfMap / Cos(lv_targetAngle));
lv_targetAngle = (90.0 - lv_targetAngle);
lv_cosineofTargetAngle = Cos(lv_targetAngle);
if ((lv_cosineofTargetAngle > -0.001) && (lv_cosineofTargetAngle < 0.001)) {
lv_abilityTargetPoint = Point(PointGetX(lv_targetPoint), PointGetY(RegionGetBoundsMax(RegionPlayableMap())));
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:301
}
else {
lv_triangle2C = (lv_targetXToEdgeOfMap / Cos(lv_targetAngle));
if ((lv_triangle1C < lv_triangle2C)) {
lv_abilityTargetPoint = libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint, (lv_triangle1C * -1.0), lv_casterPoint);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:315
lv_targetYToEdgeOfMap = PointGetY(lv_targetPoint);
lv_targetAngle = (AngleBetweenPoints(lv_casterPoint, lv_targetPoint) - 180.0);
lv_cosineofTargetAngle = Cos(lv_targetAngle);
if ((lv_cosineofTargetAngle > -0.001) && (lv_cosineofTargetAngle < 0.001)) {
lv_abilityTargetPoint = Point(PointGetX(lv_targetPoint), PointGetY(RegionGetBoundsMin(RegionPlayableMap())));
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:320
}
else {
lv_triangle1C = (lv_targetXToEdgeOfMap / Cos(lv_targetAngle));
lv_targetAngle = (90.0 - lv_targetAngle);
lv_cosineofTargetAngle = Cos(lv_targetAngle);
mods/heromods/imperius.stormmod — base.stormdata/LibHIMP.galaxy:130
}
lv_iTAngle = MinF(AbsF((lv_imperiusUnitFacing360 - lv_relativeAngle360)), AbsF(((lv_imperiusUnitFacing360 + lv_relativeAngle360) - 360.0)));
lv_iADistance = (Cos(lv_iTAngle) * lv_iTDistance);
if (((lv_iADistance >= lv_minSkewerDistance) && (lv_iADistance <= lv_maxSkewerDistance))) {
lv_alignmentPoint = PointWithOffsetPolar(lv_imperiusUnitPoint, lv_iADistance, lv_imperiusUnitFacing);
mods/novastoryassets.sc2mod — base3.sc2maps/maps/campaign/nova/nova09.sc2map/MapScript.galaxy:4632
lv_cameraPosition[0] = PointGetX(CameraGetTarget(1));
lv_cameraPosition[1] = (PointGetY(CameraGetTarget(1))-(Cos(CameraGetPitch(1))*CameraGetDistance(1)));
lv_cameraPosition[2] = (WorldHeight(c_heightMapGround, CameraGetTarget(1))+(Sin(CameraGetPitch(1))*CameraGetDistance(1)));
lv_effectPosition[0] = PointGetX(EventPlayerEffectUsedPoint(c_effectLocationTargetPoint));
mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova09.sc2map — MapScript.galaxy:4632
lv_cameraPosition[0] = PointGetX(CameraGetTarget(1));
lv_cameraPosition[1] = (PointGetY(CameraGetTarget(1))-(Cos(CameraGetPitch(1))*CameraGetDistance(1)));
lv_cameraPosition[2] = (WorldHeight(c_heightMapGround, CameraGetTarget(1))+(Sin(CameraGetPitch(1))*CameraGetDistance(1)));
lv_effectPosition[0] = PointGetX(EventPlayerEffectUsedPoint(c_effectLocationTargetPoint));
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:5236
lv_casterYToEdgeOfMap = (PointGetY(RegionGetBoundsMax(RegionPlayableMap())) - PointGetY(lv_casterPoint));
lv_targetAngle = AngleBetweenPoints(lv_casterPoint, lv_targetPoint);
lv_cosineofTargetAngle = Cos(lv_targetAngle);
if ((lv_cosineofTargetAngle > -0.001) && (lv_cosineofTargetAngle < 0.001)) {
lv_abilityTargetPoint = Point(PointGetX(lv_targetPoint), PointGetY(RegionGetBoundsMax(RegionPlayableMap())));
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:5241
}
else {
lv_triangle1C = (lv_targetXToEdgeOfMap / Cos(lv_targetAngle));
lv_casterTriangle1C = (lv_casterXToEdgeOfMap / Cos(lv_targetAngle));
lv_targetAngle = (90.0 - lv_targetAngle);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:5242
else {
lv_triangle1C = (lv_targetXToEdgeOfMap / Cos(lv_targetAngle));
lv_casterTriangle1C = (lv_casterXToEdgeOfMap / Cos(lv_targetAngle));
lv_targetAngle = (90.0 - lv_targetAngle);
lv_cosineofTargetAngle = Cos(lv_targetAngle);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:5244
lv_casterTriangle1C = (lv_casterXToEdgeOfMap / Cos(lv_targetAngle));
lv_targetAngle = (90.0 - lv_targetAngle);
lv_cosineofTargetAngle = Cos(lv_targetAngle);
if ((lv_cosineofTargetAngle > -0.001) && (lv_cosineofTargetAngle < 0.001)) {
lv_abilityTargetPoint = Point(PointGetX(RegionGetBoundsMax(RegionPlayableMap())), PointGetY(lv_targetPoint));
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:5249
}
else {
lv_triangle2C = (lv_targetYToEdgeOfMap / Cos(lv_targetAngle));
lv_casterTriangle2C = (lv_casterYToEdgeOfMap / Cos(lv_targetAngle));
if ((lv_triangle1C < lv_triangle2C)) {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:5250
else {
lv_triangle2C = (lv_targetYToEdgeOfMap / Cos(lv_targetAngle));
lv_casterTriangle2C = (lv_casterYToEdgeOfMap / Cos(lv_targetAngle));
if ((lv_triangle1C < lv_triangle2C)) {
lv_abilityTargetPoint = libNtve_gf_PointOffsetTowardsPoint(lv_targetPoint, (lv_triangle1C * -1.0), lv_casterPoint);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:5268
lv_casterYToEdgeOfMap = (PointGetY(RegionGetBoundsMax(RegionPlayableMap())) - PointGetY(lv_casterPoint));
lv_targetAngle = (AngleBetweenPoints(lv_casterPoint, lv_targetPoint) - 90.0);
lv_cosineofTargetAngle = Cos(lv_targetAngle);
if ((lv_cosineofTargetAngle > -0.001) && (lv_cosineofTargetAngle < 0.001)) {
lv_abilityTargetPoint = Point(PointGetX(RegionGetBoundsMin(RegionPlayableMap())), PointGetY(lv_targetPoint));
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:5273
}
else {
lv_triangle1C = (lv_targetYToEdgeOfMap / Cos(lv_targetAngle));
lv_casterTriangle1C = (lv_casterYToEdgeOfMap / Cos(lv_targetAngle));
lv_targetAngle = (90.0 - lv_targetAngle);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:5274
else {
lv_triangle1C = (lv_targetYToEdgeOfMap / Cos(lv_targetAngle));
lv_casterTriangle1C = (lv_casterYToEdgeOfMap / Cos(lv_targetAngle));
lv_targetAngle = (90.0 - lv_targetAngle);
lv_cosineofTargetAngle = Cos(lv_targetAngle);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:5276
lv_casterTriangle1C = (lv_casterYToEdgeOfMap / Cos(lv_targetAngle));
lv_targetAngle = (90.0 - lv_targetAngle);
lv_cosineofTargetAngle = Cos(lv_targetAngle);
if ((lv_cosineofTargetAngle > -0.001) && (lv_cosineofTargetAngle < 0.001)) {
lv_abilityTargetPoint = Point(PointGetX(lv_targetPoint), PointGetY(RegionGetBoundsMax(RegionPlayableMap())));
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:10465
lv_d = DistanceBetweenPoints(lv_a, lv_b);
lv_di = FixedToInt((lv_d / 5.0));
lv_x = (PointGetX(lv_a) + (Cos(lv_facing) * 5.0));
lv_y = (PointGetY(lv_a) + (Sin(lv_facing) * 5.0));
libCOMU_gv_mutatorLaserDrillSoundRegion = RegionCircle(Point(lv_x, lv_y), 1.0);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:10471
lv_i = 1;
for ( ; ( (auto81A71E4C_ai >= 0 && lv_i <= auto81A71E4C_ae) || (auto81A71E4C_ai < 0 && lv_i >= auto81A71E4C_ae) ) ; lv_i += auto81A71E4C_ai ) {
lv_x = (PointGetX(lv_a) + (Cos(lv_facing) * (IntToFixed(lv_i) * 5.0)));
lv_y = (PointGetY(lv_a) + (Sin(lv_facing) * (IntToFixed(lv_i) * 5.0)));
RegionAddCircle(libCOMU_gv_mutatorLaserDrillSoundRegion, true, Point(lv_x, lv_y), 3.0);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:11438
if ((lv_spawnDistance > libNtve_gf_HeightOfRegion(RegionPlayableMap()))) {
lv_spawnLocation = Point((lv_spawnDistance - libNtve_gf_HeightOfRegion(RegionPlayableMap())), libNtve_gf_HeightOfRegion(RegionPlayableMap()));
lv_destinationLocation = PointWithOffsetPolar(lv_spawnLocation, ((libNtve_gf_WidthOfRegion(RegionEntireMap()) - PointGetX(lv_spawnLocation)) / Cos(lv_rightTriangleAngle)), lv_moveDirection);
}
else {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:11442
else {
lv_spawnLocation = Point(0.0, lv_spawnDistance);
lv_destinationLocation = PointWithOffsetPolar(lv_spawnLocation, (PointGetY(lv_spawnLocation) / Cos(lv_rightTriangleAngle)), lv_moveDirection);
}
}