DoubleTime

This class is meant to provide a reasonably fast time implementation. Should be suitable for most usages, but it inherits the problem of the loss of precision of double numbers when comparing big numbers with low numbers. It could become a real problem with long simulations.

Constructors

Link copied to clipboard
constructor()
Default empty constructor, builds a DoubleTime with value 0.
constructor(val: Double)
Builds a new DoubleTime starting from the specified value.

Properties

Link copied to clipboard

Standard values for Time.

Functions

Link copied to clipboard
open fun compareTo(o: Time): Int
Link copied to clipboard
open fun equals(obj: Any): Boolean
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun isFinite(): Boolean

Verifies if the Time is set at finite, namely if the event will happen.

Link copied to clipboard
open fun isInfinite(): Boolean
Verifies if the Time is set at infinite, namely if the event will never happen.
Link copied to clipboard
open fun minus(dt: Time): Time
Allows to subtract a Time to this Time.
Link copied to clipboard
open fun plus(dt: Time): DoubleTime
Allows to add a Time to this Time.
Link copied to clipboard
open fun times(var: Double): Time
Allows to multiply this Time for a constant.
Link copied to clipboard
open fun toDouble(): Double
Allows to get a double representation of this Time.
Link copied to clipboard
Link copied to clipboard
open fun toString(): String