コード例 #1
0
        public static F64Quat FromAxisAngle(F64Vec3 axis, F64 angle)
        {
            F64 half_angle = F64.Div2(angle);

            return(new F64Quat(axis * F64.SinFastest(half_angle), F64.CosFastest(half_angle)));
        }
コード例 #2
0
 public static F64 LengthFastest(F64Quat a)
 {
     return(F64.SqrtFastest(LengthSqr(a)));
 }
コード例 #3
0
 public static F64 LengthSqr(F64Quat a)
 {
     return(F64.FromRaw(Fixed64.Mul(a.RawX, a.RawX) + Fixed64.Mul(a.RawY, a.RawY) + Fixed64.Mul(a.RawZ, a.RawZ) + Fixed64.Mul(a.RawW, a.RawW)));
 }
コード例 #4
0
 public static F64 Length(F64Quat a)
 {
     return(F64.Sqrt(LengthSqr(a)));
 }