Description: This function returns a Rotate value, which specifies a rotation about a point.
Returns: Rotate
Usage: Steady State
Format: Rotate(Amount, MinDegrees, MaxDegrees, Center)
Parameters: Amount { Normalize } { required } { no default: }
Any expression that returns a Normalize value, specifying how much to rotate.
MinDegrees { numeric } { required } { no default: }
Any numeric expression giving the minimum amount of rotation, in degrees. This is not a limit on the amount of rotation.
MaxDegrees { numeric } { required } { no default: }
Any numeric expression giving the maximum amount of rotation, in degrees. This is not a limit on the amount of rotation.
Center { Point } { required } { no default: }
Any expression that returns a Point. This is the center point for the rotation.
Comments: The return value is a Rotate value which specifies how to rotate about a point. It may be used in any function that accepts a Rotate value, and specifies how to rotate that object.
Example:
armRot = Rotate(Normalize(armEncoderPosition, 0, 100)
{ Amount of rotation },
45 { Minimum rotation, in degrees },
135 { Maximum rotation, in degrees },
Point(50, 75, Invalid, Invalid)
{ Center point for rotation });
This specifies a rotation about the point (50, 75). If armEncoderPosition is 0, any object that uses this Rotate will rotate 45 degrees counter-clockwise about the point (50, 75). If armEncoderPosition is 100, any object that uses this Rotate will rotate 135 degrees counter-clockwise about the point (50, 75). If armEncoderPosition is any other value, the rotation will be by a proportional amount, not limited to the range 45 to 135 degrees.
See Also:
Normalize | Point | Trajectory | Vertex