Java Float to single2short(float f)

Here you can find the source of single2short(float f)

Description

singleshort

License

Apache License

Declaration

public static short single2short(float f) 

Method Source Code

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

public class Main {
    public static short single2short(float f) {
        return (short) (((long) f << 48) >> 48);
    }/*w  w w  . j a va2s .c o  m*/
}

Related

  1. floatToS390IntBits(float ieeeFloat)
  2. floatToSemiPrecision(float f, byte abyte0[], int i)
  3. floatToSortableInt(float val)
  4. floatToSortableInt(float value)
  5. floatToTime(float aTimeDuration)
  6. single2short(float f)