AdvancedRobot SetTurnRightRadians Method Robocode Robot API for .NET
Sets the robot's body to turn right by radians when the next execution takes place.

This call returns immediately, and will not execute until you call Execute() or take an action that executes.

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.


// Set the robot to turn 180 degrees to the right

// Set the robot to turn 90 degrees to the left instead of right 
// (overrides the previous order)
SetTurnRightRadians(-Math.PI / 2);

// Executes the last SetTurnRightRadians()

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

public void SetTurnRightRadians(
	double radians


Type: OnlineSystem Double
the amount of radians to turn the robot's body to the right. If radians > 0 the robot is set to turn right. If radians < 0 the robot is set to turn left. If radians = 0 the robot is set to stop turning.
See Also