Feature requests
Spacen Jasset
spacenjasset at yahoo.co.uk
Wed Apr 2 06:19:44 PDT 2008
Derek Parnell wrote:
> On Tue, 01 Apr 2008 16:35:30 +0100, Spacen Jasset wrote:
>
> Or maybe ...
>
> enum
> {
> fPI_180 = PI / 180.0L;
> f180_PI = 180.0L / PI;
> }
>
> T degToRad(T)(T deg)
> {
> return cast(T)(cast(real)deg * fPI_180);
> }
>
> T radToDeg(T)(T rad)
> {
> return cast(T)(cast(real)rad * f180_PI);
> }
>
>
Yes, thereby giving answers in terms of float, doublt or real. How would
that be different from just implementing in terms of real anyway. reals
can be implictly converted down to a floats anyway, can they not?
Seems like I should post this to digitalmars.D
More information about the Digitalmars-d-learn
mailing list