Java Utililty Methods Second Round

List of utility methods to do Second Round

Description

The list of methods to do Second Round are organized into topic(s).

Method

doubleroundMjdToSeconds(double timeStep)
round Mjd To Seconds
double jd0 = timeStep * 100000.0;
double jd = Math.floor(jd0);
if (jd0 - jd > 0.5)
    ++jd;
timeStep = jd / 100000;
return timeStep;
longroundToNearestSecond(long time)
round To Nearest Second
return ((time + ((time >= 0) ? 500 : -500)) / 1000) * 1000;
longroundToSecond(final long pTime)
Rounds the given time down to the closest second.
return (pTime / SECOND) * SECOND;