Class Util

java.lang.Object
no.uib.jsparklines.renderers.util.Util

public class Util
extends Object
Includes general helper methods that are used by the other classes.
Author:
Harald Barsnes
  • Constructor Details

    • Util

      public Util()
  • Method Details

    • roundDouble

      public static double roundDouble​(double d, int places)
      Rounds a double value to the wanted number of decimal places.
      Parameters:
      d - the double to round of
      places - number of decimal places wanted
      Returns:
      double - the new double
    • color2Hex

      public static String color2Hex​(Color color)
      Converts a color to hex format for use in HTML tags.
      Parameters:
      color - the color to convert
      Returns:
      the color in hex format