Bind unary operators

This commit is contained in:
2018-11-11 19:56:53 +01:00
parent 4e331712a8
commit 82dff87d4d
9 changed files with 119 additions and 23 deletions

View File

@@ -51,6 +51,12 @@ namespace Upsilon.BaseTypes.Number
}
#endregion
public static Number operator - (Number n)
{
if (n.IsFloat)
return new NumberDouble(-((NumberDouble)n).Value);
return new NumberLong(-((NumberLong)n).Value);
}
#region Equality
private bool Equals(Number other)