## robocode
Class ScannedRobotEvent

    java.lang.Object
      robocode.Event
          robocode.ScannedRobotEvent

All Implemented Interfaces:
  Comparable

public class ScannedRobotEvent
extends Event

A ScannedRobotEvent is sent to `Robot.onScannedRobot(robocode.ScannedRobotEvent)` when you scan a robot. You can use the information contained in this event to determine what to do.

Constructor Summary
`ScannedRobotEvent(String name, double energy, double bearing, double distance, double heading, double velocity)` Called by the game to create a new ScannedRobotEvent.

Method Summary
`double` `getBearing()` Returns the angle to the robot, relative to your robot's heading, in degrees.
`double` `getBearingRadians()` Returns the angle to the robot, relative to your robot's heading, in radians.
`double` `getDistance()` Returns the distance to the robot you scanned (your center to his center).
`double` `getEnergy()` Returns the energy of the robot
`double` `getHeading()` Returns the direction the robot is facing, in degrees.
`double` `getHeadingRadians()` Returns the direction the robot is facing, in radians.
`double` `getLife()` Deprecated. use getEnergy()
`String` `getName()` Returns the name of the robot
`double` `getRobotBearing()` Deprecated. use getBearing()
`double` `getRobotBearingDegrees()` Deprecated. use getBearing()
`double` `getRobotBearingRadians()` Deprecated. use getBearingRadians()
`double` `getRobotDistance()` Deprecated. use getDistance()
`double` `getRobotHeading()` Deprecated. use getHeading()
`double` `getRobotHeadingDegrees()` Deprecated. use getHeading()
`double` `getRobotHeadingRadians()` Deprecated. use getHeadingRadians()
`double` `getRobotLife()` Deprecated. use getEnergy()
`String` `getRobotName()` Deprecated. use getName()
`double` `getRobotVelocity()` Deprecated. use getVelocity()
`double` `getVelocity()` Returns the velocity of the robot

Methods inherited from class robocode.Event
`compareTo, getPriority, getTime, setPriority, setTime`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ScannedRobotEvent

    public ScannedRobotEvent(String name,
                             double energy,
                             double bearing,
                             double distance,
                             double heading,
                             double velocity)

  Called by the game to create a new ScannedRobotEvent.

Method Detail

### getBearing

    public double getBearing()

  Returns the angle to the robot, relative to your robot's heading, in degrees. -180 < getRobotBearing() <= 180

  Returns:
    the angle to the robot

### getBearingRadians

    public double getBearingRadians()

  Returns the angle to the robot, relative to your robot's heading, in radians. -PI < getRobotBearingRadians() <= PI

  Returns:
    the angle to the robot

### getDistance

    public double getDistance()

  Returns the distance to the robot you scanned (your center to his center).

  Returns:
    the distance to the robot you scanned.

### getEnergy

    public double getEnergy()

  Returns the energy of the robot

  Returns:
    the energy of the robot

### getHeading

    public double getHeading()

  Returns the direction the robot is facing, in degrees. 0 <= getRobotHeading() < 360

  Returns:
    the direction the robot is facing

### getHeadingRadians

    public double getHeadingRadians()

  Returns the direction the robot is facing, in radians. 0 <= getRobotHeading() < 2*PI

  Returns:
    the direction the robot is facing

### getLife

    public double getLife()

  Deprecated. use getEnergy()

### getName

    public String getName()

  Returns the name of the robot

  Returns:
    the name of the robot

### getRobotBearing

    public double getRobotBearing()

  Deprecated. use getBearing()

### getRobotBearingDegrees

    public double getRobotBearingDegrees()

  Deprecated. use getBearing()

### getRobotBearingRadians

    public double getRobotBearingRadians()

  Deprecated. use getBearingRadians()

### getRobotDistance

    public double getRobotDistance()

  Deprecated. use getDistance()

### getRobotHeading

    public double getRobotHeading()

  Deprecated. use getHeading()

### getRobotHeadingDegrees

    public double getRobotHeadingDegrees()

  Deprecated. use getHeading()

### getRobotHeadingRadians

    public double getRobotHeadingRadians()

  Deprecated. use getHeadingRadians()

### getRobotLife

    public double getRobotLife()

  Deprecated. use getEnergy()

### getRobotName

    public String getRobotName()

  Deprecated. use getName()

### getRobotVelocity

    public double getRobotVelocity()

  Deprecated. use getVelocity()

### getVelocity

    public double getVelocity()

  Returns the velocity of the robot

  Returns:
    the velocity of the robot