示例#1
0
        public static F64Quat Normalize(F64Quat a)
        {
            long inv_norm = F64.Rcp(Length(a)).Raw;

            return(new F64Quat(
                       Fixed64.Mul(a.RawX, inv_norm),
                       Fixed64.Mul(a.RawY, inv_norm),
                       Fixed64.Mul(a.RawZ, inv_norm),
                       Fixed64.Mul(a.RawW, inv_norm)));
        }
示例#2
0
        public static F64Quat Inverse(F64Quat a)
        {
            long inv_norm = F64.Rcp(LengthSqr(a)).Raw;

            return(new F64Quat(
                       -Fixed64.Mul(a.RawX, inv_norm),
                       -Fixed64.Mul(a.RawY, inv_norm),
                       -Fixed64.Mul(a.RawZ, inv_norm),
                       Fixed64.Mul(a.RawW, inv_norm)));
        }