LibCapy - range

Class to implement range of value.

Macros:

Range object. Declaration macro for a range of values of type 'type' and name 'name'

Create a new CapyRange

Input argument(s):

min: the lower value of the range
max: the upper value of the range

Output and side effect(s):

Return a new CapyRange

Create a newly allocated CapyRange

Input argument(s):

min: the lower value of the range
max: the upper value of the range

Output and side effect(s):

Return a newly allocated CapyRange

Exception(s):

May raise CapyExc_MallocFailed

Free the memory used by a CapyRange

Input argument(s):

that: the CapyRange to free

Free the memory used by a pointer to a CapyRange and reset '*that' to NULL

Input argument(s):

that: a pointer to the CapyRange to free

Trim a value to a CapyRange interval

Input argument(s):

val: the value to trim

Output and side effect(s):

Returned the value trimmed to the interval of the range

Clip the range to with another

Input argument(s):

range: the other range

Output and side effect(s):

The range is modified to the intersection of the range and the other range. max < min means the intersection is empty

Definition macro calling all the submacros at once for a range object

Enumerations:

None.

Typedefs:

None.

Functions:

None.

2021-11-24
in LibCapy,
67 views
Copyright 2021-2024 Baillehache Pascal