Math 3D
Work with distances, directions, and rotations in three dimensions.
Feature: Math
What do you want to do?
float llVecDist(vector vec_a, vector vec_b)Returns a float representing the undirected, non-negative distance between vectors vec_a and vec_b.vector llVecNorm(vector vec)Returns the normalized unit vector pointing the same direction as vec. If <0, 0, 0>, return <0, 0, 0>.rotation llRotBetween(vector start_vec, vector end_vec)Returns the shortest-path quaternion that rotates start_vec onto end_vec.Reference
14 topic entries
float llAngleBetween(rotation start_rot, rotation end_rot)functionReturns the angle, in radians, between rotations start_rot and and end_rot.
rotation llAxes2Rot(vector fwd, vector left, vector up)functionReturns the rotation defined by the coordinate axes fwd, left, and up.
rotation llAxisAngle2Rot(vector axis, float angle)functionReturns the rotation that rotates angle radians around the axis vector.
rotation llEuler2Rot(vector vec)functionReturns the quaternion representation of the Euler angles (in radians) within vec.
float llRot2Angle(rotation q)functionReturns the angle, in radians, that q rotates.
vector llRot2Axis(rotation q)functionReturns the unit vector axis that q rotates around.
vector llRot2Euler(rotation q)functionReturns a vector of Euler angles (roll, pitch, yaw) of q. The angles will be in radians.
vector llRot2Fwd(rotation q)functionReturns the unit vector pointing toward positive X (forward) in the coordinate space of rotation q. Equivalent to <1, 0, 0> * q.
vector llRot2Left(rotation q)functionReturns the unit vector pointing toward positive Y (left) in the coordinate space of rotation q. Equivalent to <0, 1, 0> * q.
vector llRot2Up(rotation q)functionReturns the unit vector pointing toward positive Z (up) in the coordinate space of rotation q. Equivalent to <0, 0, 1> * q.
rotation llRotBetween(vector start_vec, vector end_vec)functionReturns the shortest-path quaternion that rotates start_vec onto end_vec.
float llVecDist(vector vec_a, vector vec_b)functionReturns a float representing the undirected, non-negative distance between vectors vec_a and vec_b.
float llVecMag(vector vec)functionReturns the magnitude (geometric length) of vec.
vector llVecNorm(vector vec)functionReturns the normalized unit vector pointing the same direction as vec. If <0, 0, 0>, return <0, 0, 0>.
No matching entries. Try a different term or filter.