Open leftiness opened 7 years ago
Related #66, #67. Kind of got tedious as a result of using Wall::Strength(u32)
instead of just Prism(point, 1, 0, 0, 0)
.
Thoughts. Ties into #9.
Point(1, 2, 5).rotate(Point(0, 0, 0), 2);
Point(1, 2, 5).rotate(Around(Point(0, 0, 0), Rotations(2));
Point(1, 2, 5).rotate_around(Point(0, 0, 0)).times(2);
For example:
With newtypes:
It gets rid of the magic number problem. I mean... I've already kind of made it better by accepting a Point struct and a Direction enum. It could be better.
You can take it further. Not sure if it's necessarily good:
It gives those magic numbers context in exchange for making them more verbose. You explicitly don't want to impl from()/etc because you want it to keep that verbosity.