All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.yamcs.utils.UnsignedLong Maven / Gradle / Ivy

There is a newer version: 5.10.9
Show newest version
package org.yamcs.utils;

public class UnsignedLong {
    /**
     * Converts unsigned long to double 
     * copied from guava 
     **/
    public static double toDouble(long x) {
        double d = (double) (x & 0x7fffffffffffffffL);
        if (x < 0) {
            d += 0x1.0p63;
        }
        return d;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy