POV-Ray : Newsgroups : povray.general : Buggy trig? : Re: Buggy trig? Server Time
9 Aug 2024 23:25:26 EDT (-0400)
  Re: Buggy trig?  
From: Chris Huff
Date: 23 Jun 2000 14:19:13
Message: <chrishuff-99C52E.13233823062000@news.povray.org>
In article <slr### [at] tealhhjpat>, 
hjp### [at] SiKituwsracat (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] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.