RateControlRobot GunRotationRateRadians Property Robocode Robot API for .NET
The gun's clockwise (right) rotation per turn, in radians.

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 gun turns counterclockwise (left)

Examples

// Set the gun to turn right pi / 16 radians per turn
GunRotationRateRadians = Math.PI / 16;

// Set the gun to turn left pi / 12 radians per turn 
// (overrides the previous order)
GunRotationRateRadians = -Math.PI / 12;

...
// Executes the last GunRotationRateRadians
Execute();

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

public double GunRotationRateRadians { get; set; }

Property Value

Type: OnlineDouble
See Also

RateControlRobot GunRotationRateRadians