public static unsafe Vec2 operator -(Vec2 a, Vec2 b) { #if IMOET_UNSAFE Vec2 res = zero; UMath.MassSubtract((float *)&a, (float *)&b, (float *)&res, 2); return(res); #else return(new Vec2(a.x - b.x, a.y - b.y)); #endif }
public static Matrix3x3 operator -(Matrix3x3 a, Matrix3x3 b) { #if IMOET_UNSAFE Matrix3x3 m = new Matrix3x3(); UMath.MassSubtract(a.Ptr, b.Ptr, m.Ptr, 9); return(m); #else return(UMath.SubtractMatrix(a, b)); #endif }
public static unsafe Vec3 operator -(Vec3 l, Vec3 r) { #if IMOET_UNSAFE Vec3 res = zero; UMath.MassSubtract((float *)&l, (float *)&r, (float *)&res, 3); return(res); #else return(new Vec3(l.x - r.x, l.y - r.y, l.z - r.z)); #endif }