diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-08-13 09:43:35 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-08-13 09:43:35 +0200 |
commit | 9814176e83fc621f5dc150ec923c558435a41b4e (patch) | |
tree | 35732ff23180b0237b18e2804f0fa7b0904578ac /pose-widget | |
parent | 1ea849d0f6f934beb69ed72790f02d079a7ba435 (diff) |
pose-widget: const nonsense
Diffstat (limited to 'pose-widget')
-rwxr-xr-x | pose-widget/glwidget.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pose-widget/glwidget.cpp b/pose-widget/glwidget.cpp index 8a90c37c..6c04c4e6 100755 --- a/pose-widget/glwidget.cpp +++ b/pose-widget/glwidget.cpp @@ -77,11 +77,11 @@ public: } bool barycentric_coords(const vec2& px, vec2& uv) const { - vec2 v2 = px - origin; - num dot12 = v1.dot(v2); - num dot02 = v0.dot(v2); - num u = (dot11 * dot02 - dot01 * dot12) * invDenom; - num v = (dot00 * dot12 - dot01 * dot02) * invDenom; + const vec2 v2 = px - origin; + const num dot12 = v1.dot(v2); + const num dot02 = v0.dot(v2); + const num u = (dot11 * dot02 - dot01 * dot12) * invDenom; + const num v = (dot00 * dot12 - dot01 * dot02) * invDenom; uv = vec2({u, v}); return (u >= 0) && (v >= 0) && (u + v <= 1); } |