Java Ceil ceilToQuarterMs(float f)

Here you can find the source of ceilToQuarterMs(float f)

Description

"rounds up" to nearest increment of 0.25, e.g.

License

BSD License

Parameter

Parameter Description
f a parameter

Declaration

public static float ceilToQuarterMs(float f) 

Method Source Code

//package com.java2s;
// LICENSE:      This file is distributed under the BSD license.

public class Main {
    /**/*  w w w  . ja  va 2 s.  c o m*/
     * "rounds up" to nearest increment of 0.25, e.g. 0.0 goes to 0.0 but 0.01 goes to 0.25
     * @param f
     * @return
     */
    public static float ceilToQuarterMs(float f) {
        return (float) (Math.ceil(f * 4) / 4);
    }
}

Related

  1. ceilPowerOf2Bits(final long x)
  2. ceilPrime(long p)
  3. ceilSec(long milli)
  4. ceilToBase(int number, int base)
  5. ceilToPowerOfTwo(float value)
  6. ceilU(final float value)
  7. ceily(double a, double precision)