User Tools

Site Tools


DzTimeRange

Represents an interval of time with a beginning and an end.

More...

Inherits :

Properties

DAZ Script
Numberend
Numberstart

Constructors

DAZ Script
DzTimeRange ()
DzTimeRange ( DzTimeRange interval )
DzTimeRange ( DzTime start, DzTime end )

Methods

DAZ Script
DzTimeRangeadd ( Number time )
voidextendEndsBy ( Number time )
NumbergetDuration ()
voidinclude ( Number time )
voidinclude ( DzTimeRange range )
voidintersect ( DzTimeRange range )
BooleanisEmpty ()
BooleanisIncluded ( Number time )
BooleanisIncluded ( DzTimeRange range )
voidmakeEmpty ()
Booleanoverlaps ( DzTimeRange range )
DzTimeRangesubtract ( Number time )

Detailed Description

TODO: Add detailed description.

Properties


Number : end

The end of the time range.


Number : start

The start of the time range.

Constructors


DzTimeRange()

Default Constructor. Creates the time range [DZ_MIN_TIME,DZ_MAX_TIME]


DzTimeRange( DzTimeRange interval )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.


DzTimeRange( DzTime start, DzTime end )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Methods


DzTimeRange : add( Number time )

Return Value:

  • The result of adding the given amount of time to both ends of this range

void : extendEndsBy( Number time )

Extends the ends of this range by the given amount of time


Number : getDuration()

Return Value:

  • The length of the time range.

void : include( Number time )

Sets the time range to include the given time


void : include( DzTimeRange range )

Sets the time range to include the given time range


void : intersect( DzTimeRange range )

Sets this time range to the intersection with the given time range.


Boolean : isEmpty()

Return Value:

  • True if the range is length 0.

Boolean : isIncluded( Number time )

Return Value:

  • True if the given time falls inside this range

Boolean : isIncluded( DzTimeRange range )

Return Value:

  • True if the given range falls inside this range

void : makeEmpty()

Sets the time range to be empty.


Boolean : overlaps( DzTimeRange range )

Return Value:

  • True if the given range overlaps this range

DzTimeRange : subtract( Number time )

Return Value:

  • The result of subtracting the given amount of time from both ends of the range