Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What object is this cross in a circle?
#8
(03-18-2016, 07:04 PM)tomaszkax86 Wrote: Angle in degrees can be used in sin() and cos() to compute Cartesian direction. In standard math:

Code:
float radius = 5.0f;
float dx = radius * cos(angle);
float dy = radius * sin(angle);

dx and dy will be the change you need to apply to position. radius is the distance from the object. 

It's not clear for me how do we know that we need to put into radius exactly 5.0f? Isn't the distance from the object changes as the bot moves? And what does means the letter f after 5.0?


Messages In This Thread
RE: What object is this cross in a circle? - by Rinoldo - 03-19-2016, 04:32 AM

Forum Jump:


Users browsing this thread: 10 Guest(s)