‹— back


Started writing up a thing using radians and degrees safely, interchangeably, and understandably. And then realised half of the assumptions were wrong. Note-taking:

Degrees and Radians ctors both take in the named unit (the Degrees float is degrees). Every other usage is rads, always.

No implicit conversions for affecting their value, ever. Operators for neither should take in raw primitive types.

They should explicitly take in each other.

We still need an implicit conversion to be able to use these with data that is typed as float. The prior explicit conversions are important because they should take precedent over this.


Possible addition but not really a fan, overload the dereference operator for radians.