|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartisynth.core.util.TimeBase
public class TimeBase
Converts between basic Artisynth time units (ticks) and seconds, milliseconds, microseconds, and frequency. The basic time tick is a sub-nanosecond quantity chosen to allow the time intervals associated with standard audio frequencies (i.e., 48kHz, 44.1khz, 32khz, etc.), as well as those which are multiples of 1 microsecond, to be represented as long integers.
Field Summary | |
---|---|
static double |
PRECISION
Reciprocal of the smallest time unit used by round(double) . |
Constructor Summary | |
---|---|
TimeBase()
|
Method Summary | |
---|---|
static int |
compare(double t0,
double t1)
Compares t0 and t1 within the tolerance
specified by the reciprocal of PRECISION . |
static boolean |
equals(double t0,
double t1)
Returns true if t0 and t1 are equal
within the tolerance specified by PRECISION . |
static void |
main(java.lang.String[] args)
|
static double |
modulo(double t0,
double t1)
Returns t0 modulo t1 ,
within the tolerance specified by PRECISION . |
static double |
round(double t)
Rounds t to the nearst PRECISION seconds. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double PRECISION
round(double)
.
Constructor Detail |
---|
public TimeBase()
Method Detail |
---|
public static double round(double t)
t
to the nearst PRECISION
seconds.
public static boolean equals(double t0, double t1)
t0
and t1
are equal
within the tolerance specified by PRECISION
.
public static double modulo(double t0, double t1)
t0
modulo t1
,
within the tolerance specified by PRECISION
.
PRECISION
.public static int compare(double t0, double t1)
t0
and t1
within the tolerance
specified by the reciprocal of PRECISION
. Returns an
integer which is less than, equal, or greater than 0 if
t0
is less than, equal, or greater than t1
.
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |