rotating a point by x-axis is the formula valid for any theta
Dear Friends
I am trying to sweep a set of points by some degree theta. So I am using this formula
newx = x;
newy = y * cos(theta) - z * sin(theta);
newz = y * sin(theta) + z * cos(theta);
Is this formula valid for any degree theta.
Because when theta=360 degree, then sin(theta) = 1.47e--05
Re: rotating a point by x-axis is the formula valid for any theta
Originally Posted by sujan.dasmahapatra
Because when theta=360 degree, then sin(theta) = 1.47e--05
Floating point operations are never mathematically exact. You expected an answer of zero, but instead got 1.47e-05, which is probably within expected errors for floating point operations.
Bookmarks