Java Number Round roundToShort(final double d)

Here you can find the source of roundToShort(final double d)

Description

round To Short

License

Open Source License

Declaration

final public static short roundToShort(final double d) 

Method Source Code

//package com.java2s;
// License as published by the Free Software Foundation; either

public class Main {
    final public static short roundToShort(final double d) {
        return (short) (d + 0.5);
    }//from  w ww . ja  v a 2  s.c o m
}

Related

  1. roundToPowerOf10(double value, int powerOf10)
  2. roundToPowerOf2(int value)
  3. roundToPrecision(double number, int precision)
  4. roundToPrecision(float value, int numDecimalPlaces)
  5. roundToQuarterMs(float f)
  6. roundToSignificantDigits(double num, int n)
  7. roundToSignificantDigits(double value, int n)
  8. roundToSignificantDigits(double x, double y, int nSignif)
  9. roundToSignificantFigures(double num, int n)