public override DustObject Multiply(DustObject other) { if (other is DustInt) { return(new DustString(string.Concat(Enumerable.Repeat(Value, other.ToInt())))); } return(base.Multiply(other)); }
public override DustObject Subtract(DustObject other) { if (other is DustString) { return(new DustString(Value.Replace(other.ToString(), ""))); } return(base.Subtract(other)); }
public override DustObject Divide(DustObject other) { if (other is DustInt) { throw new NotImplementedException("Arrays are not implemented"); } if (other is DustString) { throw new NotImplementedException("Arrays are not implemented"); } return(base.Divide(other)); }
public override DustObject Divide(DustObject other) { return(new DustFloat(Value / other.ToFloat())); }
public override DustObject Multiply(DustObject other) { return(new DustFloat(Value * other.ToFloat())); }
public override DustObject Subtract(DustObject other) { return(new DustFloat(Value - other.ToFloat())); }
public override DustObject Add(DustObject other) { return(new DustFloat(Value + other.ToFloat())); }
public override DustObject Divide(DustObject other) { return(new DustDouble(Value / other.ToDouble())); }
public override DustObject Multiply(DustObject other) { return(new DustDouble(Value * other.ToDouble())); }
public override DustObject Subtract(DustObject other) { return(new DustDouble(Value - other.ToDouble())); }
public override DustObject Add(DustObject other) { return(new DustDouble(Value + other.ToDouble())); }
public virtual DustObject Divide(DustObject other) { return(null); }
public virtual DustObject Multiply(DustObject other) { return(null); }
public virtual DustObject Subtract(DustObject other) { return(null); }
public virtual DustObject Add(DustObject other) { return(null); }
public override DustObject Add(DustObject other) { return(new DustString(Value + other.ToString())); }