Java Second timecents2seconds(int timecents)

Here you can find the source of timecents2seconds(int timecents)

Description

timecentsseconds

License

Open Source License

Parameter

Parameter Description
timecents [-32768...+32767]

Return

the converted timecents, in seconds

Declaration

public static final double timecents2seconds(int timecents) 

Method Source Code

//package com.java2s;

public class Main {
    /**//from   w  ww. ja v a  2s .co  m
     * @param timecents [-32768...+32767]
     * @return the converted timecents, in seconds
     */
    public static final double timecents2seconds(int timecents) {
        if (timecents <= -32768) {
            return 0.0;
        }
        // TODO: use a table
        return Math.pow(2.0, timecents / 1200.0);
    }
}

Related

  1. secondToString(long second)
  2. stringToSeconds(String string)
  3. strTimeToSeconds(String hmsTimes)
  4. ticksToSeconds(long ticks)
  5. ticksWithSecondsSetTo(long ticks, int seconds)
  6. timeDecimalSeconds(String time)
  7. timeElapsedSecond(long prevTime, long curTime, long periodSecond)
  8. timeFromSeconds(int timeInSec)
  9. timeFromSeconds(long ms)