Reworked bound variables into specific LuaType class instead of anonymous objects

This commit is contained in:
2018-11-14 13:09:01 +01:00
parent dff1ddc0ba
commit deefe43d9f
17 changed files with 125 additions and 56 deletions

View File

@@ -1,9 +1,11 @@
namespace Upsilon.BaseTypes.Number
{
public abstract class Number
public abstract class Number : LuaType
{
protected abstract bool IsFloat { get; }
public override Type Type => Type.Number;
#region Binary Operators
public static Number operator + (Number a, Number b)

View File

@@ -21,5 +21,11 @@ namespace Upsilon.BaseTypes.Number
{
return Value.ToString(CultureInfo.InvariantCulture);
}
public static implicit operator double(NumberDouble n)
{
return n.Value;
}
}
}

View File

@@ -23,7 +23,7 @@ namespace Upsilon.BaseTypes.Number
return Value.ToString(CultureInfo.InvariantCulture);
}
public static explicit operator long(NumberLong n)
public static implicit operator long(NumberLong n)
{
return n.Value;
}