General fixes tweaks and things

This commit is contained in:
2018-12-03 18:32:27 +01:00
parent 6ba3860e84
commit 5b0ce2e52c
20 changed files with 240 additions and 28 deletions

View File

@@ -44,7 +44,7 @@ namespace Upsilon.BaseTypes.Number
public static ScriptNumber operator / (ScriptNumber a, ScriptNumber b)
{
if (!a.IsFloat && !b.IsFloat)
return new ScriptNumberLong(((ScriptNumberLong) a).Value / ((ScriptNumberLong) b).Value);
return new ScriptNumberDouble(((ScriptNumberLong) a).Value / (double)((ScriptNumberLong) b).Value);
if (a.IsFloat && b.IsFloat)
return new ScriptNumberDouble(((ScriptNumberDouble) a).Value / ((ScriptNumberDouble) b).Value);
if (a.IsFloat)