Point2D

org.homebrew.engine

## Class Point2D

- java.lang.Object
- - org.homebrew.engine.Point2D

-     public class Point2D
      extends java.lang.Object

  This class represents a single point on a game object and classes may extend it to represent a single fixed point value such as a position or velocity etc.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private double` | `x` x value
    `private double` | `y` y value

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Point2D(double x, double y)` double constructor
    `Point2D(float x, float y)` float constructor
    `Point2D(int x, int y)` int constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `decrementX(double dec)` decrement the x value as a double
    `void` | `decrementX(float dec)` decrement the x value as a float
    `void` | `decrementX(int dec)` decrement the x value as an integer
    `void` | `decrementY(double dec)` decrement the y value as a double
    `void` | `decrementY(float dec)` decrement the y value as a float
    `void` | `decrementY(int dec)` decrement the y value as an integer
    `void` | `incrementX(double inc)` increment the x value as a double
    `void` | `incrementX(float inc)` increment the x value as a float
    `void` | `incrementX(int inc)` increment the x value as an integer
    `void` | `incrementY(double inc)` increment the y value as a double
    `void` | `incrementY(float inc)` increment the y value as a float
    `void` | `incrementY(int inc)` increment the y value as an integer
    `void` | `setX(double x)` Sets the x value as a double
    `void` | `setX(float x)` Sets the x value as a float
    `void` | `setX(int x)` Sets the x value as an integer
    `void` | `setY(double y)` Sets the y value as a double
    `void` | `setY(float y)` Sets the y value as a float
    `void` | `setY(int y)` Sets the y value as an integer
    `double` | `X()` Returns the x value
    `double` | `Y()` Returns the y value

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### x

          private double x

      x value

    - #### y

          private double y

      y value

  - ### Constructor Detail

    - #### Point2D

          public Point2D(double x,
                         double y)

      double constructor
      Parameters:
        `x` - x value as a double
        `y` - y value as a double

    - #### Point2D

          public Point2D(float x,
                         float y)

      float constructor
      Parameters:
        `x` - x value as a float
        `y` - y value as a float

    - #### Point2D

          public Point2D(int x,
                         int y)

      int constructor
      Parameters:
        `x` - x value as integer
        `y` - y value as integer

  - ### Method Detail

    - #### X

          public final double X()

      Returns the x value
      Returns:
        double x value

    - #### setX

          public final void setX(double x)

      Sets the x value as a double
      Parameters:
        `x` - new x value as a double

    - #### setX

          public final void setX(float x)

      Sets the x value as a float
      Parameters:
        `x` - new x value as a float

    - #### setX

          public final void setX(int x)

      Sets the x value as an integer
      Parameters:
        `x` - new x value as an integer

    - #### incrementX

          public final void incrementX(double inc)

      increment the x value as a double
      Parameters:
        `inc` - increment to x as a double

    - #### incrementX

          public final void incrementX(float inc)

      increment the x value as a float
      Parameters:
        `inc` - increment to x as a float

    - #### incrementX

          public final void incrementX(int inc)

      increment the x value as an integer
      Parameters:
        `inc` - increment to x as a integer

    - #### decrementX

          public final void decrementX(double dec)

      decrement the x value as a double
      Parameters:
        `dec` - increment to x as a double

    - #### decrementX

          public final void decrementX(float dec)

      decrement the x value as a float
      Parameters:
        `dec` - increment to x as a float

    - #### decrementX

          public final void decrementX(int dec)

      decrement the x value as an integer
      Parameters:
        `dec` - increment to x as a integer

    - #### Y

          public final double Y()

      Returns the y value
      Returns:
        double y value

    - #### setY

          public final void setY(double y)

      Sets the y value as a double
      Parameters:
        `y` - new y value as a double

    - #### setY

          public final void setY(float y)

      Sets the y value as a float
      Parameters:
        `y` - new y value as a float

    - #### setY

          public final void setY(int y)

      Sets the y value as an integer
      Parameters:
        `y` - new y value as an integer

    - #### incrementY

          public final void incrementY(double inc)

      increment the y value as a double
      Parameters:
        `inc` - increment to y as a double

    - #### incrementY

          public final void incrementY(float inc)

      increment the y value as a float
      Parameters:
        `inc` - increment to y as a float

    - #### incrementY

          public final void incrementY(int inc)

      increment the y value as an integer
      Parameters:
        `inc` - increment to y as a integer

    - #### decrementY

          public final void decrementY(double dec)

      decrement the y value as a double
      Parameters:
        `dec` - increment to y as a double

    - #### decrementY

          public final void decrementY(float dec)

      decrement the y value as a float
      Parameters:
        `dec` - increment to y as a float

    - #### decrementY

          public final void decrementY(int dec)

      decrement the y value as an integer
      Parameters:
        `dec` - increment to y as a integer