All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pythagoras.i.IPoint Maven / Gradle / Ivy

There is a newer version: 1.4.3
Show newest version
//
// Pythagoras - a collection of geometry classes
// http://github.com/samskivert/pythagoras

package pythagoras.i;

/**
 * Provides read-only access to a {@link Point}.
 */
public interface IPoint extends Cloneable
{
    /** Returns this point's x-coordinate. */
    int x ();

    /** Returns this point's y-coordinate. */
    int y ();

    /** Returns the squared Euclidian distance between this point and the specified point. */
    int distanceSq (int px, int py);

    /** Returns the squared Euclidian distance between this point and the supplied point. */
    int distanceSq (IPoint p);

    /** Returns the Euclidian distance between this point and the specified point. */
    int distance (int px, int py);

    /** Returns the Euclidian distance between this point and the supplied point. */
    int distance (IPoint p);

    /** Returns a mutable copy of this point. */
    Point clone ();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy