public IFixedArith <T> Multiply(IFixedArith <T> other) { long thisNumber = this.Number; thisNumber *= other.Number; thisNumber >>= Fraction.Point; return(new Fixed <T>((int)thisNumber, false)); }
public int CompareTo([AllowNull] IFixedArith <T> other) { if (this.Number < other.Number) { return(-1); } else if (this.Number == other.Number) { return(0); } else { return(1); } }
public bool Equals([AllowNull] IFixedArith <T> other) { return(this.Number == other.Number); }
public IFixedArith <T> Divide(IFixedArith <T> other) { return(new Fixed <T>((int)((((long)this.Number) << this.Fraction.Point) / other.Number), false)); }
public IFixedArith <T> Add(IFixedArith <T> other) { return(new Fixed <T>(this.Number + other.Number, false)); }
public IFixedArith <T> Subtract(IFixedArith <T> other) { return(new Fixed <T>(this.Number - other.Number, false)); }