AdvancedRobot TurnRightRadians Method Robocode Robot API for .NET
Immediately turns the robot's body to the right by radians. This call executes immediately, and does not return until it is complete, i.e. when the angle remaining in the robot's turn is 0.

Note that both positive and negative values can be given as input, where negative values means that the robot's body is set to turn left instead of right.

Examples

// Turn the robot 180 degrees to the right
TurnRightRadians(Math.PI);

// Afterwards, turn the robot 90 degrees to the left
TurnRightRadians(-Math.PI / 2);

Namespace: Robocode
Assembly: robocode (in robocode.dll) Version: 1.9.2.0
Syntax

public void TurnRightRadians(
	double radians
)

Parameters

radians
Type: OnlineSystem Double
the amount of radians to turn the robot's body to the right. If radians > 0 the robot will turn right. If radians < 0 the robot will turn left. If radians = 0 the robot will not turn, but execute.
See Also