Camera3dVector Normalize3dVector( Camera3dVector v) { Camera3dVector res; float l = GetF3dVectorLength(&v); if (l == 0.0f) return NULL_VECTOR; res.x = v.x / l; res.y = v.y / l; res.z = v.z / l; return res; }
SF3dVector Normalize3dVector(SF3dVector v) { SF3dVector res; float l= GetF3dVectorLength(v); if (l== 0.0f) return F3dVector(0, 0, 0); res.x= v.x/ l; res.y= v.y/ l; res.z= v.z/ l; return res; }