Beispiel #1
0
        public static fp SignedAngle(fp3 lhs, fp3 rhs, fp3 axis)
        {
            var num1 = VecMath.Angle(lhs, rhs);
            var num2 = (lhs.y * rhs.z - lhs.z * rhs.y);
            var num3 = (lhs.z * rhs.x - lhs.x * rhs.z);
            var num4 = (lhs.x * rhs.y - lhs.y * rhs.x);
            var num5 = fpmath.sign(axis.x * num2 + axis.y * num3 + axis.z * num4);

            return(num1 * num5);
        }
Beispiel #2
0
 public static float Angle(Vector3 lhs, Vector3 rhs)
 {
     return(VecMath.Angle((fp3)lhs, (fp3)rhs));
 }
Beispiel #3
0
 public static fp SignedAngle(fp2 lhs, fp2 rhs)
 {
     return(VecMath.Angle(lhs, rhs) * fpmath.sign(lhs.x * rhs.y - lhs.y * rhs.x));
 }
Beispiel #4
0
 public static float Angle(Vector2 lhs, Vector2 rhs)
 {
     return(VecMath.Angle((fp2)lhs, (fp2)rhs));
 }