@Test public void testBotRectangle() { Point2D.Double botLocation = newLocation(155, 720); RobotState state = RobotState.newBuilder() .setLocation(botLocation) .build(); Rectangle2D.Double botRectangle = state.botRectangle(); assertEquals(36, botRectangle.width, 0.001); assertEquals(36, botRectangle.height, 0.001); assertEquals(137, botRectangle.getMinX(), 0.001); assertEquals(173, botRectangle.getMaxX(), 0.001); assertEquals(702, botRectangle.getMinY(), 0.001); assertEquals(738, botRectangle.getMaxY(), 0.001); assertEquals(155, botRectangle.getCenterX(), 0.001); assertEquals(720, botRectangle.getCenterY(), 0.001); assertEquals(botRectangle, state.botRectangle()); }
public Rectangle2D.Double botRectangle() { if (_botRectangle == null) { _botRectangle = new Rectangle2D.Double(location.x - 18, location.y - 18, 36, 36); } return _botRectangle; }
RobotState { public Rectangle2D.Double botRectangle() { if (_botRectangle == null) { _botRectangle = new Rectangle2D.Double(location.x - 18, location.y - 18, 36, 36); } return _botRectangle; } }
RobotState { public Rectangle2D.Double botRectangle() { if (_botRectangle == null) { _botRectangle = new Rectangle2D.Double(location.x - 18, location.y - 18, 36, 36); } return _botRectangle; } private  RobotState(Point2D.Double location, double heading, double velocity,
      long time, boolean interpolated); }
RobotState { public Rectangle2D.Double botRectangle() { if (_botRectangle == null) { _botRectangle = new Rectangle2D.Double(location.x - 18, location.y - 18, 36, 36); } return _botRectangle; } private  RobotState(Point2D.Double location, double heading, double velocity,
      long time, boolean interpolated); List<Point2D.Double> botCorners(); Rectangle2D.Double botRectangle(); List<Line2D.Double> botSides(); static Builder newBuilder(); }
RobotState { public Rectangle2D.Double botRectangle() { if (_botRectangle == null) { _botRectangle = new Rectangle2D.Double(location.x - 18, location.y - 18, 36, 36); } return _botRectangle; } private  RobotState(Point2D.Double location, double heading, double velocity,
      long time, boolean interpolated); List<Point2D.Double> botCorners(); Rectangle2D.Double botRectangle(); List<Line2D.Double> botSides(); static Builder newBuilder(); final Point2D.Double location; final double heading; final double velocity; final long time; final boolean interpolated; }