in reply to Re^4: RFC: Math::Triangle (Perl 6)
in thread RFC: Math::Triangle (Perl 6)
Angles have multiple representations for example. In Radians and Degrees.
The same reasoning holds for any magnitude (as for instance those representing length, time, weight, etc.), and well, you could define an algebra where magnitudes carry their units and make a lot of interesting things with it, like checking that your operations are consistent and that you don't add meters to seconds, for instance.
But just doing it for angles, well...
and who knows what else.
Yes, exactly, what else?
The only interesting thing I can think of is to avoid rounding errors. For instance, computers can not represent 90degrees in radians, just an approximation. Math::Angle could overload trigonometric operations and compute then using the degrees representation, without converting to radians first... but well, that's a daunting (and slow) task!
Update: s/degradians/degrees/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: RFC: Math::Triangle (Perl 6)
by holli (Abbot) on Sep 18, 2017 at 15:20 UTC | |
by pryrt (Abbot) on Sep 18, 2017 at 16:54 UTC | |
by gsiems (Deacon) on Sep 18, 2017 at 16:59 UTC | |
|
Re^6: RFC: Math::Triangle (Perl 6)
by soonix (Chancellor) on Sep 18, 2017 at 16:58 UTC |