Policy that reflects (folds) the value at both boundaries.

Synopsis

Declared in <mp‐units/overflow_policies.h>

template<Quantity Q>
struct reflect_in_range;

Description

Values that exceed [min, max]are "bounced back" from the boundary. For example, with latitude[‐90, 90]: 91 ‐> 89, 180 ‐> 0, 270 ‐> ‐90.

Member Functions

Name

Description

operator()

Reflects v into the closed range [`min`, max].

Data Members

Name

Description

max

The upper boundary of the reflection range

min

The lower boundary of the reflection range

Created with MrDocs