
31 Mar
2007
31 Mar
'07
10:04 p.m.
AMDG Matthias Schabel <boost <at> schabel-family.org> writes:
You're misusing dimensionless_quantity....
Not sure what you mean - I need to preserve system information in dimensionless quantities to make the trig functions properly invertible : that is acos(cos(theta)) == theta should hold true...
/// cos of theta in radians template<class Y> typename dimensionless_quantity<*angle::radian*,Y>::type cos(const quantity<angle::radian,Y>& theta) { return std::cos(theta.value()); } /// utility class to simplify construction of dimensionless quantities template<*class System*,class Y> struct dimensionless_quantity { typedef quantity<typename dimensionless_unit<System>::type,Y> type; }; In Christ, Steven Watanabe