Skip to content

Commit 5228ea6

Browse files
committed
Cleanup for 2.23 into main
1 parent 347bdaf commit 5228ea6

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

olcPixelGameEngine.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,8 @@
316316
+FillTexturedPolygon() - Hijacks DecalStructure for configuration
317317
+olc::vf2d arguments for Sprite::Sample() functions
318318
2.22: = Fix typo on dragged file buffers for unicode builds
319+
2.23: Fixed Emscripten host sizing errors - Thanks Moros
320+
Fixed v2d_generic.clamp() function
319321
320322
!! Apple Platforms will not see these updates immediately - Sorry, I dont have a mac to test... !!
321323
!! Volunteers willing to help appreciated, though PRs are manually integrated with credit !!
@@ -395,7 +397,7 @@ int main()
395397
#include <cstring>
396398
#pragma endregion
397399

398-
#define PGE_VER 222
400+
#define PGE_VER 223
399401

400402
// O------------------------------------------------------------------------------O
401403
// | COMPILER CONFIGURATION ODDITIES |
@@ -683,7 +685,7 @@ namespace olc
683685
v2d_generic min(const v2d_generic& v) const { return v2d_generic(std::min(x, v.x), std::min(y, v.y)); }
684686
v2d_generic cart() { return { std::cos(y) * x, std::sin(y) * x }; }
685687
v2d_generic polar() { return { mag(), std::atan2(y, x) }; }
686-
v2d_generic clamp(const v2d_generic& v1, const v2d_generic& v2) const { return this->max(v1)->min(v2); }
688+
v2d_generic clamp(const v2d_generic& v1, const v2d_generic& v2) const { return this->max(v1).min(v2); }
687689
v2d_generic lerp(const v2d_generic& v1, const double t) { return this->operator*(T(1.0 - t)) + (v1 * T(t)); }
688690
T dot(const v2d_generic& rhs) const { return this->x * rhs.x + this->y * rhs.y; }
689691
T cross(const v2d_generic& rhs) const { return this->x * rhs.y - this->y * rhs.x; }

0 commit comments

Comments
 (0)