|
![](/i/fill.gif) |
In article <slr### [at] teal h hjp at>,
hjp### [at] SiKitu wsr ac at (Peter J. Holzer) wrote:
> >(In the spirit of offering a solution, how about a "trig_units" keyword
> >in the global_settings, where a user could specify "degrees" or
> >"radians"?)
>
> Not good. That would break existing include files. A pragma which
> affects only the source file it is in, but not any included files might
> be safer, but I'm not too sure about that. The only way I can see which
> wouldn't break compatibility would be a second set of functions (e.g.,
> dsin, dcos, ...) which uses degrees instead of radians.
It should be pretty easy to implement an "#angle_unit" keyword that
behaves like #version, you could get the current unit and save it,
switch to your preferred unit inside your include file, and switch back
without the user of the include knowing about it. Or you could use one
unit in some places and another in others, depending on what you are
doing. It could support degrees, radians, and whatever else you want, as
well as a "standard" setting(degrees for rotate, radians for trig).
Most calculators allow you to do this, why not POV?
--
Christopher James Huff - Personal e-mail: chr### [at] mac com
TAG(Technical Assistance Group) e-mail: chr### [at] tag povray org
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |