Java Integer Truncate truncate(int z, int base, int max)

Here you can find the source of truncate(int z, int base, int max)

Description

truncate

License

Apache License

Declaration

public static int truncate(int z, int base, int max) 

Method Source Code

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

public class Main {
    public static int truncate(int z, int base, int max) {
        if (z + base > max) {
            return max - z;
        } else {//from   w w w.j a  v a  2s.c o m
            return z;
        }
    }
}

Related

  1. truncate(int a, int b)
  2. truncate(int n, int smallestDigit, int biggestDigit)