Java Integer Truncate truncate(int a, int b)

Here you can find the source of truncate(int a, int b)

Description

truncate

License

Open Source License

Declaration

public static int[] truncate(int a, int b) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int[] truncate(int a, int b) {
        int quo = a / b;
        return new int[] { quo, a - (quo * b) };
    }// www .  ja  v a2  s.c o m

    public static long[] truncate(long a, long b) {
        long quo = a / b;
        return new long[] { quo, a - (quo * b) };
    }
}

Related

  1. truncate(int n, int smallestDigit, int biggestDigit)
  2. truncate(int z, int base, int max)