GSC reference › Built-in
AbsAngleClamp360()
Built-in (engine)
Server + client
Math
Returns <angle> as a value in the range of 0 and 360 degrees.
Signature
AbsAngleClamp360(<angle>)
Parameters
| Name | Required? | Details |
|---|---|---|
| angle | Required | An angle. |
Returns
Returns <angle> as a value in the range of 0 and 360 degrees.
Example (from Treyarch's docs)
new_angle = AbsAngleClamp360( boatAngles[2] )
Real uses in BO3's scripts
Called 33 times in the decompiled scripts. A few, zombies first:
- scripts/zm/_zm_weap_ball.gsc, line 1556
playerangles = (math::clamp(playerangles[0], -85, 85), absangleclamp360(playerangles[1] + 20), playerangles[2]); - scripts/zm/zm_genesis_challenges.gsc, line 869
var_a0fa82de = absangleclamp360(var_a0fa82de); - scripts/zm/zm_island_challenges.gsc, line 438
arc_angle_degrees = absangleclamp360(arc_angle_degrees); - scripts/zm/zm_stalingrad_challenges.gsc, line 581
arc_angle_degrees = absangleclamp360(arc_angle_degrees); - scripts/zm/zm_stalingrad_ee_main.gsc, line 4716
arc_angle_degrees = absangleclamp360(arc_angle_degrees);
Related built-ins
- AnglesToForward()Returns the forward vector corresponding to a set of angles.
- VectortoAngles()Returns a set of angles corresponding to the given vector.
- AnglesToRight()Returns the right vector corresponding to a set of angles.
- AnglesToUp()Returns the up vector corresponding to a set of angles.
- AngleClamp180()Returns angle value clamped between [-180,180].
- AbsAngleClamp180()Returns abs angle value clamped between [0,180].
- AngleLerp()Returns <angle> lerped angle value.
- CombineAngles()Returns angles b reoriented by angles a.
- DiffTrackAngle()Returns a lagged angle between <from> and <to> based on <rate> and <deltaTime>.
- ForwardRotateAroundUpByAngle()Returns a vector that is the result of angles1 forward vector rotated around its up by degrees
- GetTagAngles()Gets the angles of the tag
- GetPlayerAngles()Get the player view angles
New to GSC?
Start with the basics, or paste a compile error to get the fix.
Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).