note
johnnywang
Just a little change, the formula was not correct (as I pointed out in my previous post in this thread)
<code>
# 2 points on a plane
my $x = 2;
my $y = 1;
#yang is the y-angle 0-360 i want to rotate by
my $yang = 45;
#convert yang to radians
$yang = 3.14159265358979*$yang/180;
my $xnew = cos($yang)*$x - sin($yang)*y;
my $ynew = sin($yang)*$x + cos($yang)*y;
print "x=$xnew, y=$ynew\n";
</code>
399996
400038