Rotates a vector about the origin by an angle given in Radians
radians.
A point (x,y) can be rotated around the origin (0,0) by running it through the following equations
to get the new point (x',y'):
x' = cos(theta)*x - sin(theta)*y
y' = sin(theta)*x + cos(theta)*y
where theta is the angle by which to rotate the point.
Namespace: Terrarium.Sdk.Classes.HelpersAssembly: Terrarium.Sdk (in Terrarium.Sdk.dll) Version: 1.1.0.0 (1.1.0.0)
Syntaxpublic Vector Rotate(
double radians
)
Public Function Rotate (
radians As Double
) As Vector
public:
Vector^ Rotate(
double radians
)
member Rotate :
radians : float -> Vector
Parameters
- radians
- Type: SystemDouble
System.Double for the rotation angle in radians.
Return Value
Type:
Vector
Vector representing the newly rotated vector.
See Also