Examples of swapLSBMSB()


Examples of gov.fnal.eag.healpix.BitManipulation.swapLSBMSB()

public class BitManipulationTest extends TestCase {
  public void testBitManipulation() {
    BitManipulation bm = new BitManipulation();
        long mag1 = BitManipulation.magic2;
    long a = 3;
    long b = bm.swapLSBMSB(a);
    assertEquals("swapLSBMSB=" + b, 1, a/b, 1e-10);
    a = 8;
    b = bm.swapLSBMSB(a);
    assertEquals("swapLSBMSB=" + b, 2, a/b, 1e-10);
    a = 3;
View Full Code Here

Examples of gov.fnal.eag.healpix.BitManipulation.swapLSBMSB()

        long mag1 = BitManipulation.magic2;
    long a = 3;
    long b = bm.swapLSBMSB(a);
    assertEquals("swapLSBMSB=" + b, 1, a/b, 1e-10);
    a = 8;
    b = bm.swapLSBMSB(a);
    assertEquals("swapLSBMSB=" + b, 2, a/b, 1e-10);
    a = 3;
    b = bm.invswapLSBMSB(a);
    assertEquals("invswapLSBMSB=" + b, -4, b, 1e-10);
    a = 8;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.