Here you can find the source of doubleToShortBits(double d)
Parameter | Description |
---|---|
d | The double to transform. |
public static int doubleToShortBits(double d)
//package com.java2s; public class Main { /**//from w w w . j a v a 2 s . c om * Turns a double-precision floating point integer into an integer. * * @param d * The double to transform. * @return The converted integer. */ public static int doubleToShortBits(double d) { long l = Double.doubleToLongBits(d); return (int) (l >> 48); } }