Code/Util/Math/Subtract.cs
namespace Nodebox.Util.Math;
public sealed class Subtract : BinaryOperator {
public override Dictionary<(Type, Type), Func<object, object, object>> BaseLookup => new() {
{ (typeof(float), typeof(float)), (a, b) => (float)a - (float)b },
{ (typeof(double), typeof(double)), (a, b) => (double)a - (double)b },
{ (typeof(int), typeof(int)), (a, b) => (int)a - (int)b },
{ (typeof(uint), typeof(uint)), (a, b) => (uint)a - (uint)b },
{ (typeof(long), typeof(long)), (a, b) => (long)a - (long)b },
{ (typeof(ulong), typeof(ulong)), (a, b) => (ulong)a - (ulong)b },
{ (typeof(short), typeof(short)), (a, b) => (short)a - (short)b },
{ (typeof(ushort), typeof(ushort)), (a, b) => (ushort)a - (ushort)b },
{ (typeof(sbyte), typeof(sbyte)), (a, b) => (sbyte)a - (sbyte)b },
{ (typeof(byte), typeof(byte)), (a, b) => (byte)a - (byte)b },
{ (typeof(Vector2), typeof(Vector2)), (a, b) => (Vector2)a - (Vector2)b },
{ (typeof(Vector3), typeof(Vector3)), (a, b) => (Vector3)a - (Vector3)b },
{ (typeof(Vector4), typeof(Vector4)), (a, b) => (Vector4)a - (Vector4)b },
{ (typeof(Vector2Int), typeof(Vector2Int)), (a, b) => (Vector2Int)a - (Vector2Int)b },
{ (typeof(Vector3Int), typeof(Vector3Int)), (a, b) => (Vector3Int)a - (Vector3Int)b },
{ (typeof(Angles), typeof(Angles)), (a, b) => (Angles)a - (Angles)b },
// { (typeof(Rotation), typeof(Rotation)), (a, b) => (Rotation)a - (Rotation)b },
{ (typeof(Color), typeof(Color)), (a, b) => (Color)a - (Color)b },
// { (typeof(Rect), typeof(Rect)), (a, b) => (Rect)a - (Rect)b },
// { (typeof(RectInt), typeof(RectInt)), (a, b) => (RectInt)a - (RectInt)b },
};
}