Tweaks for tests, allow for grabbing global scope variables
This commit is contained in:
@@ -82,5 +82,18 @@ namespace Upsilon.BaseTypes.Number
|
||||
|
||||
#endregion
|
||||
|
||||
public static explicit operator double(Number n)
|
||||
{
|
||||
if (n.IsFloat)
|
||||
return ((NumberDouble) n);
|
||||
return ((NumberLong) n).Value;
|
||||
}
|
||||
|
||||
public static explicit operator long(Number n)
|
||||
{
|
||||
if (n.IsFloat)
|
||||
return (long)((NumberDouble) n).Value;
|
||||
return ((NumberLong) n).Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user