Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: [Request / Solved] (C++) Atan2  (Read 2400 times)

0 Members and 1 Guest are viewing this topic.

Ben

[Request / Solved] (C++) Atan2
« on: April 18, 2006, 06:44:07 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 437
Does anyone know where 0 of this is? (North, East, South, West)
And what direction does it go in (clock, anti-clock).
« Last Edit: February 24, 2012, 12:18:50 pm by Niek »
Logged
Want a place to upload your sprites and games for FREE? Look no further than GameDevotion
Re: (C++) Atan2
« Reply #1 on: April 18, 2006, 07:42:38 pm »
  • Huzzowee!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 571
Normally 0 is on the right (East) and it goes counter-clockwise.
0 - East
90 - North
180 - West
270 - South
Logged
"They say 'Don't sweat the little things!', but in the end, the little things are all that matter..."
--Alex2539

Ben

Re: (C++) Atan2
« Reply #2 on: April 18, 2006, 07:45:21 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 437
Oddly enough it goes clockwise :S.
I just tried it, lol.
Logged
Want a place to upload your sprites and games for FREE? Look no further than GameDevotion

aab

^ Evolved from a Hobbit
Re: (C++) Atan2
« Reply #3 on: April 19, 2006, 10:52:07 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 992
lol. Mathematics is all anti-clockwise, its just that because the screen your drawing to is vertically flipped it ends up differently: It would be an easy mistake to make.
Revolve the x axis towards the y axis, and that is your positive angle or rotation. When your working in 3d, x to y == yaw, y to z == pitch, z to x==roll, so its always positive when moving one along ...xyzxyzxyzxyzxyz... and negative the other way. Just remmember that.
Logged




I ♥ Sol
.... I ♥ Sol ? wtf how long has that been there? >_> *rrrrrrrrar*
  • MySpace

Ben

Re: (C++) Atan2
« Reply #4 on: April 21, 2006, 01:01:02 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 437
Yeh I know that it should work anti-clockwise, and along cartesian axes it does work anti-clockwise but unfortunately some idiot (tcha who's stupid idea was that) decided that we should have the x min and the y min as the top left hand corner.

It's bloody annoying doing all your math on a cartesian plane and then doing your computer drawing with an inverted y axis.
Logged
Want a place to upload your sprites and games for FREE? Look no further than GameDevotion

aab

^ Evolved from a Hobbit
Re: (C++) Atan2
« Reply #5 on: April 21, 2006, 03:29:10 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 992
Well, its the way the scanline moves, and the way we write: And all this started out with (well..boxes..but then moved onto) text.
It is weird though...You always have to think of your math upside down lol.
Logged




I ♥ Sol
.... I ♥ Sol ? wtf how long has that been there? >_> *rrrrrrrrar*
  • MySpace
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.055 seconds with 46 queries.