$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [math] round to fraction
From: gast128 (gast128_at_[hidden])
Date: 2010-10-27 06:23:49
John Maddock <boost.regex <at> virgin.net> writes:
> Probably overkill to add to Boost.Math, but how about:
>
> template <class T>
> T round2fraction(T x, T f)
> {
> return f * round(x/f);
> }
Thx, this is at least shorter than our solution.