Interval Module

Functions and values

Function or value Description

add a b

Full Usage: add a b

Parameters:
Returns: Interval<^a>
Modifiers: inline
Type parameters: ^a

Add two given intervals.

a : Interval<^a>

b : Interval<^a>

Returns: Interval<^a>

Example

createClosedOfSize min size

Full Usage: createClosedOfSize min size

Parameters:
    min : ^f -
    size : ^g -

Returns: Interval<^f>
Modifiers: inline
Type parameters: ^f, ^g

Creates closed interval [min,max] by given start and size

min : ^f

size : ^g

Returns: Interval<^f>

Example

createLeftOpenOfSize min size

Full Usage: createLeftOpenOfSize min size

Parameters:
    min : ^b -
    size : ^a -

Returns: Interval<^b>
Modifiers: inline

Creates closed interval [min,max] by given start and size

min : ^b

size : ^a

Returns: Interval<^b>

Example

createOpenOfSize min size

Full Usage: createOpenOfSize min size

Parameters:
    min : ^a -
    size : ^a

Returns: Interval<^a>
Modifiers: inline
Type parameters: ^a

Creates open interval (min,max) by given start and size

min : ^a

size : ^a
Returns: Interval<^a>

Example

createRightOpenOfSize min size

Full Usage: createRightOpenOfSize min size

Parameters:
    min : ^b -
    size : ^a -

Returns: Interval<^b>
Modifiers: inline

Creates closed interval [min,max] by given start and size

min : ^b

size : ^a

Returns: Interval<^b>

Example

getEnd interval

Full Usage: getEnd interval

Parameters:
Returns: 'a
Modifiers: inline
Type parameters: 'a
interval : Interval<'a>
Returns: 'a

getSize interval

Full Usage: getSize interval

Parameters:
Returns: ^b
Modifiers: inline
Type parameters: ^a, ^b, ^a

Returns the size of an Interval [min,max] (max - min)

interval : Interval<^a>

Returns: ^b

Example

getSizeBy projection interval

Full Usage: getSizeBy projection interval

Parameters:
    projection : 'a -> ^b -
    interval : Interval<'a> -

Returns: ^c
Modifiers: inline

Returns the range of an Interval [min,max] (projection max - projection min)

projection : 'a -> ^b

interval : Interval<'a>

Returns: ^c

Example

getStart interval

Full Usage: getStart interval

Parameters:
Returns: 'a
Modifiers: inline
Type parameters: 'a
interval : Interval<'a>
Returns: 'a

getValueAt percentage interval

Full Usage: getValueAt percentage interval

Parameters:
    percentage : float -
    interval : Interval<^a> -

Returns: float
Modifiers: inline

Get the value at a given percentage within (0.0 - 1.0) or outside (< 0.0, > 1.0) of the interval. Rounding to nearest neighbour occurs when needed.

percentage : float

interval : Interval<^a>

Returns: float

Example

intersect a b

Full Usage: intersect a b

Parameters:
Returns: Interval<'a>
Modifiers: inline
Type parameters: 'a

Returns the intersection of this interval with another.

a : Interval<'a>

b : Interval<'a>

Returns: Interval<'a>

Example

isIntersection a b

Full Usage: isIntersection a b

Parameters:
Returns: bool
Modifiers: inline
Type parameters: 'a

Checking for intersection of both intervals

a : Interval<'a>

b : Interval<'a>

Returns: bool

Example

subtract a b

Full Usage: subtract a b

Parameters:
Returns: Interval<^a>
Modifiers: inline
Type parameters: ^a

Subtract a given interval from the other interval.

a : Interval<^a>

b : Interval<^a>

Returns: Interval<^a>

Example

trySize interval

Full Usage: trySize interval

Parameters:
Returns: ^b option
Modifiers: inline

Returns the size of an closed interval

interval : Interval<^a>

Returns: ^b option

Example

values interval

Full Usage: values interval

Parameters:
Returns: 'a * 'a
Modifiers: inline
Type parameters: 'a
interval : Interval<'a>
Returns: 'a * 'a