Package org.openhab.core.util
Class ColorUtil.Point
java.lang.Object
org.openhab.core.util.ColorUtil.Point
- Enclosing class:
ColorUtil
Class for points in the CIE xy color space
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreturn point closest to this point on a line between a and bdoublecrossProduct(ColorUtil.Point other) return the cross product of this tuple and the other tupledoubledistance(ColorUtil.Point other) distance between this point and another point
-
Field Details
-
x
public final double x -
y
public final double y
-
-
Constructor Details
-
Point
public Point()a default point with x/y = 0.0 -
Point
public Point(double x, double y) a point with the given values- Parameters:
x- the x-value (between 0.0 and 1.0)y- the y-value (between 0.0 and 1.0)
-
-
Method Details
-
distance
distance between this point and another point- Parameters:
other- the other point- Returns:
- distance as double
-
crossProduct
return the cross product of this tuple and the other tuple- Parameters:
other- the other point- Returns:
- the cross product as double
-
closest
return point closest to this point on a line between a and b- Parameters:
a- point ab- point b- Returns:
- the point closest to this point on a-b
-