This website works better with JavaScript.
Home
Help
Sign In
VCVRack
/
Rack
mirror of
https://github.com/VCVRack/Rack.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
38
Wiki
Activity
Browse Source
Add Rect::interpolate().
tags/v2.0.0
Andrew Belt
3 years ago
parent
78bd95c088
commit
802f71eb8e
1 changed files
with
4 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+4
-0
include/math.hpp
+ 4
- 0
include/math.hpp
View File
@@ -427,6 +427,10 @@ struct Rect {
r.size = size.minus(delta.mult(2.f));
return r;
}
/** Returns `pos + size * p` */
Vec interpolate(Vec p) {
return pos.plus(size.mult(p));
}
// Method aliases
bool isContaining(Vec v) const {
Write
Preview
Loading…
Cancel
Save