Package org.pathvisio.libgpml.util
Class LinAlg.Point
java.lang.Object
org.pathvisio.libgpml.util.LinAlg.Point
- Enclosing class:
- LinAlg
public static class LinAlg.Point
extends java.lang.Object
Point, pair of doubles. Supports adding, substracting, calculating the length
of the vector, etc.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description LinAlg.Point
add(LinAlg.Point p)
double[]
asArray()
int[]
asIntArray()
LinAlg.Point
clone()
double
len()
LinAlg.Point
multiply(double d)
LinAlg.Point
norm()
LinAlg.Point
subtract(LinAlg.Point p)
java.awt.geom.Point2D
toPoint2D()
java.lang.String
toString()
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
x
public double x -
y
public double y
-
-
Constructor Details
-
Point
public Point(double x, double y) -
Point
public Point(java.awt.geom.Point2D p2d)
-
-
Method Details
-
toPoint2D
public java.awt.geom.Point2D toPoint2D() -
asIntArray
public int[] asIntArray() -
asArray
public double[] asArray() -
norm
-
len
public double len() -
add
-
subtract
-
multiply
-
clone
- Overrides:
clone
in classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-