Java Double Convert to double2short(double d)

Here you can find the source of double2short(double d)

Description

doubleshort

License

Apache License

Declaration

public static short double2short(double d) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static short double2short(double d) {
        return (short) (((long) d << 48) >> 48);
    }//from   w w w.  j  a  v  a  2  s .c  om
}

Related

  1. double2dimToFloat1Dim(double[][] points)
  2. double2fixed(double value)
  3. double2Float(double[] v)
  4. double2int(final double d)
  5. double2long(double value)
  6. double2sortableStr(double val)