  | 
  | 
 | 
  | 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
HI Guys
When using the Atan2(x,y) function I get a domain error when one or both of the
any way. What Am I missing?
 
 Post a reply to this message 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
On 08/11/14 16:35, kevva wrote:
> HI Guys
> When using the Atan2(x,y) function I get a domain error when one or both of the
> any way. What Am I missing?
> 
> 
> 
I'm probably wrong (I usually am) but my reading of the docs says that
atan(a, b) says that atan will return a correct number when 'b' is zero;
it says nothing about 'a'.
What exactly are you trying to do? A code snippet would help.
John
-- 
Protect the Earth
It was not given to you by your parents
You hold it in trust for your children
 
 Post a reply to this message 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
Doctor John <j.g### [at] gmail com> wrote:
> On 08/11/14 16:35, kevva wrote:
> > HI Guys
> > When using the Atan2(x,y) function I get a domain error when one or both of the
> > any way. What Am I missing?
> >
> >
> >
>
> I'm probably wrong (I usually am) but my reading of the docs says that
> atan(a, b) says that atan will return a correct number when 'b' is zero;
> it says nothing about 'a'.
> What exactly are you trying to do? A code snippet would help.
>
> John
> --
> Protect the Earth
> It was not given to you by your parents
> You hold it in trust for your children
Hi John
You may be right, I have an object that might just pass over the X/Y axis making
that var 0. I have written a cludge that uses the atan() when a zero is
detected. It works but it is messy!.
I my self do not have an internet connection right now so a mate Kevva has
helped me out with this. So a code example might just take me a couple of days
to get, but thanks for the advice.
 
 Post a reply to this message 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
On 08/11/14 18:04, kevva wrote:
> 
> Hi John
> You may be right, I have an object that might just pass over the X/Y axis making
> that var 0. I have written a cludge that uses the atan() when a zero is
> detected. It works but it is messy!.
> 
> I my self do not have an internet connection right now so a mate Kevva has
> helped me out with this. So a code example might just take me a couple of days
> to get, but thanks for the advice.
No problem. I'm willing to bet that you'll have a solution before then;
but if you don't, feel free to come back here.
John
-- 
Protect the Earth
It was not given to you by your parents
You hold it in trust for your children
 
 Post a reply to this message 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
kevva <gli### [at] hotmail com> wrote:
> When using the Atan2(x,y) function I get a domain error when one or both of the
> vars goes to zero. Yet the ?Help? says that ?it  will return the correct numbers
> any way. What Am I missing?
Normally atan2() should malfunction only if both parameters are zero
(because a zero vector has no defined angle). Are you sure that's not
the case here?
-- 
                                                          - Warp
 
 Post a reply to this message 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
 | 
  | 
 |   |