diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2022-02-23 19:37:10 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-02-23 19:37:10 +0100 |
| commit | 7f53ecde3a481dff3eb4e69f3cfba36d0bece7f9 (patch) | |
| tree | fb476da871d805781c4b27d297d412b507356e97 /atlas.cpp | |
| parent | 5664fd34a2f0317a276249762512d1a479fd7585 (diff) | |
flush
Diffstat (limited to 'atlas.cpp')
| -rw-r--r-- | atlas.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -27,7 +27,7 @@ std::array<Vector2, 4> atlas_texture::texcoords_for_id(int id_) const CORRADE_INTERNAL_ASSERT(id_ >= 0 && id_ < dims_.product()); Vector2i id = { id_ % dims_[0], id_ / dims_[0] }; auto p0 = Vector2(id * tile_size_) / Vector2(size_); - auto p1 = (Vector2(Vector2i{1,1} * tile_size_) - Vector2{0.5f, 0.5f}) / Vector2(size_); + auto p1 = Vector2(Vector2i{1,1} * tile_size_) / Vector2(size_); auto x0 = p0.x(), x1 = p1.x(), y0 = p0.y(), y1 = p1.y(); return {{ { x0+x1, y0+y1 }, // bottom right |
