예제 #1
0
 public static F64Vec4 RSqrt(F64Vec4 a)
 {
     return(new F64Vec4(Fixed64.RSqrt(a.RawX), Fixed64.RSqrt(a.RawY), Fixed64.RSqrt(a.RawZ), Fixed64.RSqrt(a.RawW)));
 }
예제 #2
0
 public static F64Vec4 Normalize(F64Vec4 a)
 {
     F64 ooLen = F64.FromRaw(Fixed64.RSqrt(Fixed64.Mul(a.RawX, a.RawX) + Fixed64.Mul(a.RawY, a.RawY) + Fixed64.Mul(a.RawZ, a.RawZ) + Fixed64.Mul(a.RawW, a.RawW))); return(ooLen * a);
 }
예제 #3
0
 public static F64Vec3 RSqrt(F64Vec3 a)
 {
     return(new F64Vec3(Fixed64.RSqrt(a.RawX), Fixed64.RSqrt(a.RawY), Fixed64.RSqrt(a.RawZ)));
 }
예제 #4
0
 public static F64 RSqrt(F64 a)
 {
     return(FromRaw(Fixed64.RSqrt(a.Raw)));
 }
예제 #5
0
 public static F64Vec2 RSqrt(F64Vec2 a)
 {
     return(new F64Vec2(Fixed64.RSqrt(a.RawX), Fixed64.RSqrt(a.RawY)));
 }
예제 #6
0
 public static F64Vec2 Normalize(F64Vec2 a) { F64 ooLen = F64.FromRaw(Fixed64.RSqrt(Fixed64.Mul(a.RawX, a.RawX) + Fixed64.Mul(a.RawY, a.RawY))); return ooLen * a; }
예제 #7
0
 public static F32Vec3 Normalize(F32Vec3 a)
 {
     F32 ooLen = F32.FromRaw((int)(Fixed64.RSqrt((long)a.RawX * (long)a.RawX + (long)a.RawY * (long)a.RawY + (long)a.RawZ * (long)a.RawZ) >> 16)); return(ooLen * a);
 }