The following converts vector v(3, 3, 3) to a unit vector. NJS_VECTOR v; Float scalar; v.x = 3.f; v.y = 3.f; v.z = 3.f; scalar = njUnitVector(&v) % Result % v(0.577350, 0.577350, 0.577350) scalar = 5.196152