public static TSQuaternion FromToRotation(TSVector3 fromVector, TSVector3 toVector) { TSVector3 w = TSVector3.Cross(fromVector, toVector); TSQuaternion q = new TSQuaternion(w.x, w.y, w.z, TSVector3.Dot(fromVector, toVector)); q.w += FP.Sqrt(fromVector.sqrMagnitude * toVector.sqrMagnitude); q.Normalize(); return(q); }
public static FP Dot(TSVector3 vector1, TSVector3 vector2) { return(TSVector3.Dot(ref vector1, ref vector2)); }
public static FP operator *(TSVector3 value1, TSVector3 value2) { return(TSVector3.Dot(ref value1, ref value2)); }