In
http://news.povray.org/povray.general/message/%3C45706af4%40news.povray.org%3E/#%3C45706af4%40news.povray.org%3E
Sherry Shaw mentioned:
"I wonder if some sort of generic unit conversion code might be posted on
the site, to allow coders to use the units they find most appropriate,
while simplifying end-users' ability to mix-and-match #include files...?
I still think that scaling between measurement systems is a fact of life but
this could be a convienience & it sounded like fun so I came up with the
this... Calling this macro from inside an object or union will scale it
approprietely given two unit types, e.g. "cm" & "mi". It's easy to expand
to cover whatever linear units I didn't think to include.
Comments?
Charles
Post a reply to this message
Attachments:
Download 'scale_convert.inc.txt' (4 KB)
|