Class ColorUtil.Point

java.lang.Object
org.openhab.core.util.ColorUtil.Point
Enclosing class:
ColorUtil

public static class ColorUtil.Point extends Object
Class for points in the CIE xy color space
  • 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

      public double distance(ColorUtil.Point other)
      distance between this point and another point
      Parameters:
      other - the other point
      Returns:
      distance as double
    • crossProduct

      public double crossProduct(ColorUtil.Point other)
      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 a
      b - point b
      Returns:
      the point closest to this point on a-b