Esempio n. 1
0
	SPRIG_INLINE To rational_cast(boost::rational<IntType> const& from, Converter conv) {
		return conv(from.numerator()) / conv(from.denominator());
	}
Esempio n. 2
0
	SPRIG_INLINE To rational_converter_cast(boost::rational<IntType> const& from) {
		return sprig::converter_cast<Tag, To>(from.numerator()) / sprig::converter_cast<Tag, To>(from.denominator());
	}
 static boost::rational<I> from(boost::rational<I2> x) { return boost::rational<I>(x.numerator(), x.denominator());}