Class Point2f

Object
Point2f
All Implemented Interfaces:
Serializable

public final class Point2f extends Object implements Serializable
A two-dimensional point of float values.

We consider a point to be a tuple representing a single physical point in space.

Author:
Owen Feehan
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    Point2f(float x, float y)
    Creates a new Point2f instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    void
    scale(double factor)
    Multiplies each dimension's component by a factor.
     
    float
    x()
    X-axis component of point.
    float
    y()
    Y-axis component of point.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Point2f

      public Point2f(float x, float y)
      Creates a new Point2f instance.
      Parameters:
      x - X-axis component of point.
      y - Y-axis component of point.
    • Point2f

      public Point2f()
  • Method Details

    • scale

      public void scale(double factor)
      Multiplies each dimension's component by a factor.
      Parameters:
      factor - the factor to multiply by.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • x

      public float x()
      X-axis component of point.
    • y

      public float y()
      Y-axis component of point.