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))); }
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); }
public static F64Vec3 RSqrt(F64Vec3 a) { return(new F64Vec3(Fixed64.RSqrt(a.RawX), Fixed64.RSqrt(a.RawY), Fixed64.RSqrt(a.RawZ))); }
public static F64 RSqrt(F64 a) { return(FromRaw(Fixed64.RSqrt(a.Raw))); }
public static F64Vec2 RSqrt(F64Vec2 a) { return(new F64Vec2(Fixed64.RSqrt(a.RawX), Fixed64.RSqrt(a.RawY))); }
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; }
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); }