Documentation of 'Catalano.Core.IntPoint' Java class
IntPoint
Catalano.Core

Class IntPoint



  • public class IntPoint
    extends java.lang.Object
    Class for representing a pair of coordinates of integer type.
    • Field Detail

      • x

        public int x
        Y axis coordinate.
      • y

        public int y
        Y axis coordinate.
    • Constructor Detail

      • IntPoint

        public IntPoint()
        Initializes a new instance of the IntPoint class.
      • IntPoint

        public IntPoint(IntPoint point)
        Initializes a new instance of the IntPoint class.
        Parameters:
        point - IntPoint.
      • IntPoint

        public IntPoint(int x,
                        int y)
        Initializes a new instance of the IntPoint class.
        Parameters:
        x - X axis coordinate.
        y - Y axis coordinate.
      • IntPoint

        public IntPoint(float x,
                        float y)
        Initializes a new instance of the IntPoint class.
        Parameters:
        x - X axis coordinate.
        y - Y axis coordinate.
      • IntPoint

        public IntPoint(double x,
                        double y)
        Initializes a new instance of the IntPoint class.
        Parameters:
        x - X axis coordinate.
        y - Y axis coordinate.
      • IntPoint

        public IntPoint(FloatPoint point)
        Initializes a new instance of the IntPoint class.
        Parameters:
        point - FloatPoint.
      • IntPoint

        public IntPoint(DoublePoint point)
        Initializes a new instance of the IntPoint class.
        Parameters:
        point - DoublePoint.
    • Method Detail

      • setXY

        public void setXY(int x,
                          int y)
        Sets X and Y axis coordinates.
        Parameters:
        x - X axis coordinate.
        y - Y axis coordinate.
      • Add

        public void Add(IntPoint point)
        Adds values of two points.
        Parameters:
        point - IntPoint.
      • Add

        public static IntPoint Add(IntPoint point1,
                                   IntPoint point2)
        Adds values of two points.
        Parameters:
        point1 - IntPoint.
        point2 - IntPoint.
        Returns:
        IntPoint that contains X and Y axis coordinate.
      • Add

        public void Add(int value)
        Adds values of two points.
        Parameters:
        value - Value.
      • Subtract

        public void Subtract(IntPoint point)
        Subtract values of two points.
        Parameters:
        point - IntPoint.
      • Subtract

        public static IntPoint Subtract(IntPoint point1,
                                        IntPoint point2)
        Subtract values of two points.
        Parameters:
        point1 - IntPoint.
        point2 - IntPoint.
        Returns:
        IntPoint that contains X and Y axis coordinate.
      • Subtract

        public void Subtract(int value)
        Subtract values of two points.
        Parameters:
        value -
      • Multiply

        public void Multiply(IntPoint point)
        Multiply values of two points.
        Parameters:
        point - IntPoint.
      • Multiply

        public static IntPoint Multiply(IntPoint point1,
                                        IntPoint point2)
        Multiply values of two points.
        Parameters:
        point1 - IntPoint.
        point2 - IntPoint.
        Returns:
        IntPoint that contains X and Y axis coordinate.
      • Multiply

        public void Multiply(int value)
        Multiply values of two points.
        Parameters:
        value - Value.
      • Divide

        public void Divide(IntPoint point)
        Divides values of two points.
        Parameters:
        point - IntPoint.
      • Divide

        public static IntPoint Divide(IntPoint point1,
                                      IntPoint point2)
        Divides values of two points.
        Parameters:
        point1 - IntPoint.
        point2 - IntPoint.
        Returns:
        IntPoint that contains X and Y axis coordinate.
      • Divide

        public void Divide(int value)
        Divides values of two points.
        Parameters:
        value - Value.
      • DistanceTo

        public float DistanceTo(IntPoint anotherPoint)
        Calculate Euclidean distance between two points.
        Parameters:
        anotherPoint - Point to calculate distance to.
        Returns:
        Euclidean distance between this point and anotherPoint points.
      • toFloatPoint

        public FloatPoint toFloatPoint()
        Convert IntPoint to FloatPoint.
        Returns:
        FloatPoint.
      • toDoublePoint

        public DoublePoint toDoublePoint()
        Convert IntPoint to DoublePoint.
        Returns:
        DoublePoint.
      • Swap

        public void Swap()
        Swap values between the coordinates.
      • equals

        public boolean equals(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.