Skip to content

Commit 98fb38b

Browse files
committed
Update raylib
Adds Mesh.NormalsSmooth()
1 parent 50602c7 commit 98fb38b

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ raylib::Color color = raylib::Color::Gray;
138138
color.DrawPixel(50, 50);
139139
Vector2 position(50.0f, 50.0f);
140140
color.DrawPixel(position); // No more V in method name.
141+
position.DrawPixel(color); // Alternatively
141142
```
142143
143144
### Method Chaining

include/Mesh.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ namespace raylib {
8787
return *this;
8888
}
8989

90+
inline Mesh& NormalsSmooth() {
91+
::MeshNormalsSmooth(this);
92+
return *this;
93+
}
94+
9095
inline raylib::Model LoadModelFrom() {
9196
return ::LoadModelFromMesh(*this);
9297
}

tests/raylib_test.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,10 @@ TEST_CASE("raylib_test", "[raylib_test]" ) {
2929

3030
REQUIRE(raylib::Color::LightGray.r == LIGHTGRAY.r);
3131
}
32+
33+
SECTION("RayMath") {
34+
raylib::Vector2 direction(50, 50);
35+
raylib::Vector2 newDirection = direction.Rotate(30);
36+
REQUIRE((int)newDirection.x == 18);
37+
}
3238
}

0 commit comments

Comments
 (0)