Declarations ​
pascal
function Reflect(Value, Max: Integer): Integer; overload;
function Reflect(Value, Min, Max: Integer): Integer; overload;Overload Details
Overload 1 ​
pascal
function Reflect(Value, Max: Integer): Integer; overload;Reflects an integer value in range [0..Max].
| Parameter | Type | Description |
|---|---|---|
Value | Integer | Integer value to reflect. |
Max | Integer | Inclusive upper bound. |
| Type | Description |
|---|---|
Integer | Reflected integer coordinate in range [0..Max]. |
Overload 2 ​
pascal
function Reflect(Value, Min, Max: Integer): Integer; overload;Reflects an integer value in range [Min..Max].
| Parameter | Type | Description |
|---|---|---|
Value | Integer | Integer value to reflect. |
Min | Integer | Inclusive lower bound. |
Max | Integer | Inclusive upper bound. |
| Type | Description |
|---|---|
Integer | Reflected integer coordinate in range [Min..Max]. |
Description ​
Reflect constrains Value to range [0..Max] (or [Min..Max]) using symmetry around the outer edge of boundary pixels (cycle length
For example, for Max = 3, the sequence of values generated across coordinate space is: 0, 1, 2, 3, 3, 2, 1, 0, 0, 1, 2, 3, 3, 2, 1, 0.