Logic behind degree-rad convertion
I know that to convert from degrees to rads I must do:
=> radValue = (degreeValue * 2 * pi) / 360.0f;
But I don't know why! Could someone give me a simple answer (if there is one)?
d / 360 will give a value between 0 (no rotation) and 1 (full rotation)
then multiplying that by 2pi to get rads because 2pi in rads is a full rotation
(2pi is a full rotation because the diamiter of a unit sphere is 2 and the cercumfrence is pi * diamiter)
then multiplying that by 2pi to get rads because 2pi in rads is a full rotation
(2pi is a full rotation because the diamiter of a unit sphere is 2 and the cercumfrence is pi * diamiter)
180deg/pi rad = 1
x rad * 180deg/pi rad
rad cancel out
x * 180deg/pi
This still equals x because 180deg/pi = 1, but it's now expressed as a deg because that's the only unit left.
[Edited by - yaroslavd on December 3, 2004 12:52:23 AM]
x rad * 180deg/pi rad
rad cancel out
x * 180deg/pi
This still equals x because 180deg/pi = 1, but it's now expressed as a deg because that's the only unit left.
[Edited by - yaroslavd on December 3, 2004 12:52:23 AM]
Quote:Original post by mike25025
d / 360 will give a value between 0 (no rotation) and 1 (full rotation)
then multiplying that by 2pi to get rads because 2pi in rads is a full rotation
(2pi is a full rotation because the diamiter of a unit sphere is 2 and the cercumfrence is pi * diamiter)
Perfect answer! Thanks a lot, Mike!!!
Quote:Original post by yaroslavd
180deg/pi rad = 1
x rad * 180deg/pi rad
rad cancel out
x * 180deg/pi
This still equals x because 180deg/pi = 1, but it's now expressed as a deg because that's the only unit left.
Thank you!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement