Post Reply 
atan2() Storing symbolic expression into numeric only vector object *Error*
09-04-2018, 02:43 AM
Post: #12
RE: atan2() Storing symbolic expression into numeric only vector object *Error*
(09-04-2018 01:48 AM)Albert Chan Wrote:  
(09-04-2018 12:54 AM)Magnus512 Wrote:  Parsing atan2(y,x) into EVAL() did the trick. Big Grin. If I remeber well, this error is just with vectors a list works well

I am not so sure. I think atan2(y,x) has an object reference count bug.
This is my guess ...

It fail inside RECT2SPHE (radian mode) because local variable is gone after leaving function.
(Object reference count drop to 0, object thus becomes "garbage")

It work with degrees because atan2 value multiply by factor, creating a new object.
EVAL work for the same reason (new object).

If true, it will fail with list too. Try it without EVAL, and RECT2SPHE return list instead.
Here it is, without EVAL(), usign atan(y,x), and returning a list
   
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: atan2() Storing symbolic expression into numeric only vector object *Error* - Magnus512 - 09-04-2018 02:43 AM



User(s) browsing this thread: 4 Guest(s)