Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: persistance in zcalc funct defs



On 03/05/18 04:18 AM, Peter Stephenson wrote:
On Thu, 03 May 2018 03:38:01 -0700
"jdh" <dhenman@xxxxxxxxx> wrote:
In zcalc I did the below (The constants are for 360/(2*pi) and it's
inverse)

..> function dtor $1 *  0.0174533
..> function rtod $1 * 57.2958

What an interesting coincidence, I was doing some trig just last night, and the conversion from degrees to radians was a minor bother, but a bother just the same.  Could we have the choice?  It would seem to be a very simple thing to add: "setopt ZCALC_DEGREES" "setopt ZCALC_RADIANS" ?? ... and of course the internal math would be trivial, but faster and more accurate than belaboring it in one's code.  20 minutes work (he said, with his laughable naivety ;-)




Messages sorted by: Reverse Date, Date, Thread, Author