Java Number Round roundsToTicks(double x)

Here you can find the source of roundsToTicks(double x)

Description

D&D rounds to ticks (2 seconds per round)

License

LGPL

Declaration

public static int roundsToTicks(double x) 

Method Source Code

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

public class Main {
    public static final int TICKS_PER_SEC = 20;
    public static final int SEC_PER_ROUND = 3;

    /** D&D rounds to ticks (2 seconds per round) **/
    public static int roundsToTicks(double x) {
        return secondsToTicks(x * SEC_PER_ROUND);
    }/*from w  w  w  .ja va2s .c om*/

    /** standard MC ratio **/
    public static int secondsToTicks(double x) {
        return (int) x * TICKS_PER_SEC;
    }
}

Related

  1. roundSignificant(double d, int numDigit, boolean keepInteger)
  2. roundSignificant(double value)
  3. roundSimpleNumberUnits(final long graphDefaultUnit)
  4. roundSizes(float[] sizes)
  5. roundSonekiSuii(double amount1, double amount2)
  6. roundStr(Double value, int decimal)
  7. roundString(double d)
  8. roundString(double n, double range, double precision)
  9. roundTime24h(final long defaultUnitValue)