Deutsch English Français Italiano |
<vt21j6$15gkb$2@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro <ldo@nz.invalid> Newsgroups: comp.lang.c Subject: Re: "A diagram of C23 basic types" Date: Tue, 8 Apr 2025 02:27:50 -0000 (UTC) Organization: A noiseless patient Spider Lines: 17 Message-ID: <vt21j6$15gkb$2@dont-email.me> References: <87y0wjaysg.fsf@gmail.com> <vsj1m8$1f8h2$1@dont-email.me> <vsj2l9$1j0as$1@dont-email.me> <vsjef3$1u4nk$1@dont-email.me> <vsjg6t$20pdb$1@dont-email.me> <vsjgjn$1v1n4$1@dont-email.me> <vsjk4k$24q5m$1@dont-email.me> <vsjlcp$230a5$1@dont-email.me> <vsni1v$291i3$5@dont-email.me> <slrnvv82gk.2aciv.candycanearter07@candydeb.host.invalid> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 08 Apr 2025 04:27:50 +0200 (CEST) Injection-Info: dont-email.me; posting-host="0e1143e057495279ba5407a5e9ee0a4c"; logging-data="1229451"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18WsFzvC1GNDvLOzhDpm5xT" User-Agent: Pan/0.162 (Pokrosvk) Cancel-Lock: sha1:43EZFj6bz3VOuk1XclHTuiGQ3do= Bytes: 2057 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.