MCPcopy Create free account
hub / github.com/VCVRack/Rack / clampSafe

Method clampSafe

include/math.hpp:461–466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

459}
460
461inline Vec Vec::clampSafe(Rect bound) const {
462 return Vec(
463 math::clampSafe(x, bound.pos.x, bound.pos.x + bound.size.x),
464 math::clampSafe(y, bound.pos.y, bound.pos.y + bound.size.y)
465 );
466}
467
468
469// Operator overloads for Vec

Callers 1

scrollToMethod · 0.80

Calls 2

VecClass · 0.85
clampSafeFunction · 0.85

Tested by

no test coverage detected