public override int Compare(NeoValue other) { if (other.IsInt) { return(((double)other.CheckInt().Value).CompareTo(Value)); } else if (other.IsFloat) { return(other.CheckFloat().Value.CompareTo(Value)); } throw new NeoError($"Attempt to compare float to {other.Type}"); }
public override bool Equals(NeoValue other, bool deep) { if (other.IsInt) { return(((double)other.CheckInt().Value) == Value); } else if (other.IsFloat) { return(other.CheckFloat().Value == Value); } else { return(false); } }