ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


math

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
math [2019/07/04 20:44] – [VectorToAngles] korshunmath [2019/07/05 22:38] – [VectorToAngles] korshun
Line 292: Line 292:
 Converts the vector's direction to a pair of angles (angle, pitch) and returns them using [[multiple return values]]. Converts the vector's direction to a pair of angles (angle, pitch) and returns them using [[multiple return values]].
  
-<note important>Remember that ZDoom uses negated pitch angles on actors. ACSUtils functions don'invert pitches.</note>+<note important>Remember that ZDoom uses negated pitch angles on actors. ACSUtils functions don'use negated pitches. </note>
  
 === Example usage === === Example usage ===
Line 319: Line 319:
  
 <code> <code>
-AnglesToVector(GetActorAngle(0), -GetActorPitch(0));+AnglesToVector(GetActorAngle(0), -GetActorPitch(0)); // Un-negate actor pitch
 int dirX = r1; int dirX = r1;
 int dirY = r2; int dirY = r2;
math.txt · Last modified: 2019/08/26 21:26 by korshun