Two bugs in sketch

174 views
Skip to first unread message

Lars Madsen

unread,
Jul 17, 2012, 4:05:37 AM7/17/12
to sketch...@googlegroups.com
In the implementation of acos and asin (expr.c) there is a test to see if the given argument is -1 <= val <= 1
But the test is actually

if ( -1 < val || val > 1) => error

the '<' should of course be '>'

The explanation of the atan2 function in the manual is also a bit confusing


/Lars Madsen

Gene

unread,
Jul 18, 2012, 12:05:41 AM7/18/12
to Sketch Users
Thanks. Someone else caught the arc function problem and I fixed it
some time ago. It's corrected in the current download. Sorry for the
confusion.

http://www.frontiernet.net/~eugene.ressler

I'll look at the manual problem with atan2. It's meant to duplicate
the C library function except returning degrees rather than radians.

Gene

Lars Madsen

unread,
Aug 9, 2012, 7:45:23 AM8/9/12
to sketch...@googlegroups.com
What what corrected in the current verson? the two do_asin and do_acos still have the wrong test (in version 0.3.7 which I just downloaded)

BTW: is there a buildin feature to write out (to, say, STDERR ) the value of any (sketch) variable?
Could be useful when debugging a drawing.

coffeecup

unread,
Feb 27, 2013, 4:12:39 AM2/27/13
to sketch...@googlegroups.com
I second the still existing range check bug in do_asin and do_acos functions (as of 0.3.7). When fixing, please also change the error message from "asin" to "acos" in do_acos to avoid confusion...

Cheers
Reply all
Reply to author
Forward
0 new messages