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

Method shrink

include/math.hpp:430–435  ·  view source on GitHub ↗

Contracts each corner. */

Source from the content-addressed store, hash-verified

428 }
429 /** Contracts each corner. */
430 Rect shrink(Vec delta) const {
431 Rect r;
432 r.pos = pos.plus(delta);
433 r.size = size.minus(delta.mult(2.f));
434 return r;
435 }
436 /** Returns `pos + size * p` */
437 Vec interpolate(Vec p) {
438 return pos.plus(size.mult(p));

Callers 1

drawMethod · 0.80

Calls 3

plusMethod · 0.80
minusMethod · 0.80
multMethod · 0.80

Tested by

no test coverage detected