Post Reply 
ArcTan(x,y)?
04-05-2017, 07:53 PM (This post was last modified: 04-05-2017 07:58 PM by StephenG1CMZ.)
Post: #10
RE: ArcTan(x,y)?
(04-05-2017 07:33 PM)KeithB Wrote:  
(04-05-2017 06:22 PM)StephenG1CMZ Wrote:  Mathematically, (0,0) is undefined, although in the interests of having the code not break mid-flight, atan2 implementations normally return 0.

While it might return 0 - I don't have a compiler handy to check it out - H&S say that for atan2(0,0) "a domain error occurs".

i.e., it might return 0, but set errno to EDOM.

H&S?
Health&Safety?
I'd prefer ATAN2 to deliver what it is supposed to - an ANGLE.
Then you know what angle to move your flaps to.
Having it return a Domain Error is not what I want as a passenger (though it might be useful whilst developing on the ground).

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
ArcTan(x,y)? - toml_12953 - 04-05-2017, 12:07 PM
RE: ArcTan(x,y)? - Joe Horn - 04-05-2017, 12:20 PM
RE: ArcTan(x,y)? - toml_12953 - 04-05-2017, 12:26 PM
RE: ArcTan(x,y)? - StephenG1CMZ - 04-05-2017, 03:00 PM
RE: ArcTan(x,y)? - toml_12953 - 04-05-2017, 03:39 PM
RE: ArcTan(x,y)? - StephenG1CMZ - 04-05-2017, 06:22 PM
RE: ArcTan(x,y)? - KeithB - 04-05-2017, 07:28 PM
RE: ArcTan(x,y)? - StephenG1CMZ - 04-05-2017, 07:47 PM
RE: ArcTan(x,y)? - KeithB - 04-05-2017, 10:47 PM
RE: ArcTan(x,y)? - DrD - 04-06-2017, 10:27 AM
RE: ArcTan(x,y)? - StephenG1CMZ - 04-06-2017, 03:22 PM
RE: ArcTan(x,y)? - KeithB - 04-05-2017, 07:33 PM
RE: ArcTan(x,y)? - StephenG1CMZ - 04-05-2017 07:53 PM
RE: ArcTan(x,y)? - KeithB - 04-05-2017, 08:10 PM
RE: ArcTan(x,y)? - StephenG1CMZ - 04-05-2017, 09:17 PM
RE: ArcTan(x,y)? - jte - 04-05-2017, 09:08 PM
RE: ArcTan(x,y)? - KeithB - 04-05-2017, 09:42 PM
RE: ArcTan(x,y)? - StephenG1CMZ - 04-05-2017, 10:38 PM
RE: ArcTan(x,y)? - KeithB - 04-05-2017, 10:41 PM
RE: ArcTan(x,y)? - StephenG1CMZ - 04-06-2017, 03:30 PM
RE: ArcTan(x,y)? - Han - 04-06-2017, 03:53 PM
RE: ArcTan(x,y)? - JMB - 04-09-2017, 09:50 AM
RE: ArcTan(x,y)? - StephenG1CMZ - 04-09-2017, 03:47 PM
RE: ArcTan(x,y)? - JMB - 04-09-2017, 08:00 PM
RE: ArcTan(x,y)? - KeithB - 04-06-2017, 02:38 PM
RE: ArcTan(x,y)? - StephenG1CMZ - 04-09-2017, 09:54 PM



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