Mirror

Graphics32

Mirror

function Mirror(Value: Integer; Max: Integer): Integer; overload;

function Mirror(Value: Integer; Min: Integer; Max: Integer): Integer; overload;

Description

First version mirrors integer Value in [0..Max] range. E.g. if Value is 10 and Max is 9, result will be 8.

Second version mirrors integer Value in [Min..Max] range.

See Also

Clamp, Wrap