public static LVector3 normalizesafe(LVector3 x) { LFloat len = LMath.Dot(x, x); if (len > LFloat.EPSILON) { return(x * (LFloat.one / LMath.Sqrt(len))); } return(LVector3.zero); }
public static LFloat lengthsq(LVector3 vec) { return(LMath.Dot(vec, vec)); }