Sujet : Re: "A diagram of C23 basic types"
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.cDate : 08. Apr 2025, 03:27:50
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vt21j6$15gkb$2@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : Pan/0.162 (Pokrosvk)
On Mon, 7 Apr 2025 17:30:03 -0000 (UTC), candycanearter07 wrote:
I used to do a bit of code for a codebase that did that with SECONDS and
MINUTES since (almost) every "time" variable was in milliseconds, and it
was very nice. That is just my subjective opinion, though. :P
That is the best way to handle any kind of unit conversions: define a
single conversion factor for each unit, that is used for conversion to (by
multiplication) or from (by division) a common canonical unit for that
dimension.
(“All irregularities will be handled by the forces controlling each
dimension.”)
This particularly applies to angles, where people endlessly argue over
whether radians or degrees are better. Radians are more natural for
expressing calculations, but degrees are more comprehensible to humans.