Advice appreciated.# 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; #rad is the radius of my sphere my $rad = sqrt($x**2 + $y**2); my $x = cos($yang)*$rad; my $y = sin($yang)*$rad; print "x=$x\ny=$y\n";
In reply to Re: Rotate a 3D vector
by true
in thread Rotate a 3D vector
by true
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |