Java Long Number Align align(long value, int al)

Here you can find the source of align(long value, int al)

Description

align

License

Open Source License

Declaration

public static long align(long value, int al) 

Method Source Code

//package com.java2s;

public class Main {
    public static long align(long value, int al) {
        int rest = (int) (value % (long) al);
        return value - rest;
    }/*w w  w. ja v a  2  s .  c om*/

    public static int align(int value, int al) {
        int rest = (value % al);
        return value - rest;
    }
}

Related

  1. align(final long value, final long alignment)
  2. align(long size, long boundary)
  3. align(long value, long alignment)
  4. alignDown(long value, long granularity)
  5. alignLength(int sectorSize, long remoteOffset, long len)
  6. alignOffset(int sectorSize, long fileOffset)