Print a percent complete value.

@param value Double instance
@return percent complete value
1441
public static final String printPercent(Double value)
   {
      return value == null ? null : Double.toString(value.doubleValue() / 100.0);
   }
10879
static String toBar(double percentValue) { // NOPMD
		final double myPercent = Math.max(Math.min(percentValue, 100d), 0d);
		final StringBuilder sb = new StringBuilder();
		final String body = "<img src=''?resource=bar/rb_{0}.gif'' alt=''+'' title=''"
				+ I18N.createPercentFormat().format(myPercent) + "%'' />";
		final int fullBlockCount = (int) Math.floor(myPercent / (UNIT_SIZE * PARTIAL_BLOCKS));
		final int partialBlockIndex = (int) Math
				.floor((myPercent - fullBlockCount * UNIT_SIZE * PARTIAL_BLOCKS) / UNIT_SIZE);

		sb.append(MessageFormat.format(body,
				fullBlockCount > 0 || partialBlockIndex > 0 ? "a" : "a0"));

		final String fullBody = MessageFormat.format(body, PARTIAL_BLOCKS);
		for (int i = 0; i < fullBlockCount; i++) {
			sb.append(fullBody);
		}

		if (partialBlockIndex > 0) {
			final String partialBody = MessageFormat.format(body, partialBlockIndex);
			sb.append(partialBody);
		}

		final int emptyBlocks = FULL_BLOCKS - fullBlockCount - (partialBlockIndex > 0 ? 1 : 0);
		final String emptyBody = MessageFormat.format(body, 0);
		for (int i = 0; i < emptyBlocks; i++) {
			sb.append(emptyBody);
		}

		sb.append(MessageFormat.format(body, fullBlockCount == FULL_BLOCKS ? "b" : "b0"));
		return sb.toString();
	}
295991
public static Double toDouble(Object value) throws ConversionException {
        if (value == null) {
            return null;
        } else if (value instanceof Number) {
            return ((Number) value).doubleValue();
        } else {
            NumberFormat nf = new DecimalFormat();
            try {
                return nf.parse(value.toString()).doubleValue();
            } catch (ParseException e) {
                throw new ConversionException("failed to convert: '" + value + "' to Double", e);
            }
        }
    }
186479
public final Latency withPercentile999th(double value) {
    double newValue = value;
    return new Latency(this.median, this.percentile98th, this.percentile99th, newValue, this.mean, this.min, this.max);
  }
129808
public Expression<Double> neq(double value) {
		String valueString = "'" + value + "'";
		return new Expression<Double>(this, Operation.neq, valueString);
	}
505403
def percentage(value, digits=2):
    '''
    

    '''

    value = float(value) * 100.0
    return u'' + '%s %%' % (_format(value, digits),)
856046
private int percent(final long val, final long total) {
        if (total == 0) {
            return 100;
        }

        if (val == 0) {
            return 0;
        }

        double dVal = (double) val;
        double dTotal = (double) total;

        return (int) (dVal / dTotal * 100);
    }
913876
public static double format(double value) {
        if (value == Double.MAX_VALUE) {
            return value;
        }

        long factor = (long) Math.pow(10, 2);
        value = value * factor;
        double tmp = Math.floor(value);
        return tmp / factor;
    }
546045
public boolean includes(double value)
    {
        return Double.compare(value, min) >= 0 && Double.compare(value, max) <= 0;
    }
175247
function valueToX(value) {
    const
        rect = this.$.getBoundingClientRect(),
        percent = (value - this.min) / (this.max - this.min);
    return rect.width * percent;
}
379675
public Double convertToDouble(String value) {
        Double result = null;
        if (value != null) {
            result = Double.valueOf(value);
        }
        return result;
    }
333872
public static int computeAttributeLength(String value, int whole) throws NumberFormatException
    {
        String sval = value.trim().toLowerCase();
        if (sval.endsWith("%"))
        {
            double val = Double.parseDouble(sval.substring(0, sval.length() - 1));
            return (int) Math.round(val * whole / 100.0);
        }
        else if (sval.endsWith("px"))
        {
            return (int) Math.rint(Double.parseDouble(sval.substring(0, sval.length() - 2)));
        }
        else
        {
            return (int) Math.rint(Double.parseDouble(sval));
        }
    }
143180
public final Latency withPercentile99th(double value) {
    double newValue = value;
    return new Latency(this.median, this.percentile98th, newValue, this.percentile999th, this.mean, this.min, this.max);
  }
697384
private int getPercentageY(double value) {
		value = 1.0 - value;
		double d = top + (((bottom - top) * value) / (maxPercentage - minPercentage));
		return (int) d;
	}
1129807
private double parseIntoDouble(String value) {
        double returnVal = 0.0;
        if (value.charAt(0) == '.') value = "0" + value;
        int bracketIndex = value.indexOf('(');
        if (bracketIndex != -1) {
            value = value.substring(0, bracketIndex);
        }
        try {
            returnVal = Double.parseDouble(value);
        } catch (Exception exception) {
            logger.error("Could not parse double string: ", value);
        }
        return returnVal;
    }
1102088
private void printValueString(final String value) throws IOException {
    if (this.valuesLineCounter > 0 && this.valueSeparator.length() > 0) {
      this.write(this.valueSeparator);
    }

    if (this.prefixValue.length() > 0) {
      this.write(this.prefixValue);
    }

    this.write(value);

    if (this.postfixValue.length() > 0) {
      this.write(this.postfixValue);
    }
    this.valuesLineCounter++;

    if (this.maxValuesPerLine > 0 && this.valuesLineCounter >= this.maxValuesPerLine) {
      for (final Extra e : this.extras) {
        e.onReachedMaxValueNumberForLine(this);
      }
      ensureNewLineMode();
    }
  }
203699
public StringTextValue<String> setValue(final Integer value)
	{
		final String percentFormatted = getPercentFormatted(value);
		return setValue(percentFormatted);
	}