HitByBulletEvent BearingRadians Property Robocode Robot API for .NET
Returns the bearing to the bullet, relative to your robot's heading, in radians (-Math.PI < getBearingRadians() <= Math.PI).

If you were to TurnRightRadians(event.BearingRadians), you would be facing the direction the bullet came from. The calculation used here is: (bullet's heading in radians + Math.PI) - (your heading in radians)

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

public double BearingRadians { get; }

Property Value

Type: OnlineDouble
See Also