Math functions (PB only)abs (a) Obtains the absolute value of a. atan (a) Obtains the arc tangent of a. atan2 (x, y) Obtains the arc tangent of the point x, y. ceil (a) Obtains the smallest integer greater than or equal to a. cos (a) Obtains the cosine of a, where a is in radians. acos (a) Obtains the arc cosine of a, where a is a number between -1 and 1. cross (a, b) Obtains the cross product of vectors a and b. dist (a, b) Obtains the distance between vectors a and b. dot (a, b) Obtains the dot product of vectors a and b. fmod (a, b) Obtains the remainder that results from dividing a by b. floor (a) Obtains the largest integer not greater than a. round (a) Rounds a to the nearest integer. log (a) Obtains the natural log of a. exp (a) Obtains the result of raising the natural constant e to the power of a. pow (a, b) Obtains the result of raising a to the power of b. random (d) Returns a random vector with d dimensions (1-4). To obtain a single random number, specify d as 1. sqrt (a) Obtains the square root of a. square (a) Obtains the square of a. sin (a) Obtains the sine of a, where a is in radians. asin (a) Obtains the arc sine of a, where a is a number between -1 and 1. tan (a) Obtains the tangent of a, where a is in radians. tangent (layer, property) Obtains the spatial tangent of the specified spatial property in the specified layer. The property must be spatial, such as position. Use this function to determine the direction of the spatial property's curve at the point the script is running. deg_to_rad (a) Converts degrees a to its equivalent in radians. rad_to_deg (a) Converts radians a to its equivalent in degrees. length (v) Obtains the magnitude of vector v. normalize (v) Creates unit vector from vector v in same direction. |