From 047e7995547bc046042b5df627aaf959f1ec5cc6 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Mon, 4 Nov 2019 17:49:57 -0500 Subject: [PATCH] Add math::Rect::getLeft/Top(). --- README.md | 3 +++ include/math.hpp | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index b2d1f853..eab5d3e5 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,6 @@ - [Building](https://vcvrack.com/manual/Building.html) - [Communities](https://vcvrack.com/manual/Communities.html) - [Licenses](LICENSE.md) + +This branch regularly rebases against the `v1` branch. +You may need to `git pull -f` to update your local copy. diff --git a/include/math.hpp b/include/math.hpp index 516cfdb5..39f145ca 100644 --- a/include/math.hpp +++ b/include/math.hpp @@ -299,9 +299,15 @@ struct Rect { bool isEqual(Rect r) const { return pos.isEqual(r.pos) && size.isEqual(r.size); } + float getLeft() const { + return pos.x; + } float getRight() const { return pos.x + size.x; } + float getTop() const { + return pos.y; + } float getBottom() const { return pos.y + size.y; }