mul method

MathFract mul(
  1. dynamic r
)

Implementation

MathFract mul( dynamic r ){
	if( r is MathFract ){
		return MathFract(
			(_mi != r._mi),
			_nu * r._nu,
			_de * r._de
			);
	}
	double rr = ClipMath.toDouble(r);
	double t = (rr < 0.0) ? -rr : rr;
	if( t == ClipMath.toInt( t ) ){
		return MathFract(
			(_mi != (rr < 0.0)),
			_nu * t,
			_de
			);
	}
	return mul( floatToFract( rr ) );
}