Java Double Number Round roundDownToNearestK(float v, int k)

Here you can find the source of roundDownToNearestK(float v, int k)

Description

round Down To Nearest K

License

Open Source License

Declaration

public static int roundDownToNearestK(float v, int k) 

Method Source Code

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

public class Main {
    public static int roundDownToNearestK(float v, int k) {
        return (int) (Math.floor(v / k) * k);
    }//w  ww.  jav  a 2 s  . c o m
}

Related

  1. roundDown(long n, long m)
  2. roundDown(long size, long roundBoundary)
  3. roundDown(long val, long delta)
  4. roundDownTo(int a, int quanta)
  5. roundDownToNearest(double number, double nearest)
  6. roundDownToPowerOf2(int value)