Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
axionbuster committed Feb 12, 2024
1 parent e1d4ecc commit b49e2b4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

![Screenshot](shot.png)

My goal is to have a performant real-time n-body simulator that works on all major platforms and that which is reasonably, statistically accurate.
My goal is to have a performant real-time n-body simulator that works on all major platforms and that which is
reasonably, statistically accurate.

The demo shown is in the `/demo` directory.

Expand Down Expand Up @@ -32,4 +33,6 @@ Again, C\+\+20 support is necessary (sans modules).
## Dependencies

* The CMake script is instructed to download and cache Raylib automatically.
* However, Raylib 5's build dependencies must be satisfied. The Raylib developers have made a post on their repository documenting what to install on every platform. On Windows and macOS, I didn't need to install anything (I believe). On Linux, I had to install a few things.
* However, Raylib 5's build dependencies must be satisfied. The Raylib developers have made a post on their repository
documenting what to install on every platform. On Windows and macOS, I didn't need to install anything (I believe). On
Linux, I had to install a few things.
4 changes: 2 additions & 2 deletions demo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ target_link_libraries(grass dyn)

# Header file too big; use precompiled header.
target_precompile_headers(grass INTERFACE <raylib.h>
<algorithm> <cfenv> <cmath> <complex> <sstream> <vector>
<array>)
<algorithm> <cfenv> <cmath> <complex> <sstream> <vector>
<array>)

if (APPLE)
target_link_libraries(grass "-framework IOKit")
Expand Down
5 changes: 2 additions & 3 deletions tests/yoshida_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ TEST(YoshidaSuite, Circle0) {
auto constexpr STEPS = 2'500'000;
for (long i = 0; i < STEPS; i++)
yoshi.step(dt, accel);
auto r = std::abs(yoshi.y0),
v = std::abs(yoshi.y1);
auto r = std::abs(yoshi.y0), v = std::abs(yoshi.y1);
auto y0 = yoshi.y0, y1 = yoshi.y1;
auto dot = y0.real()*y1.real()+y0.imag()*y1.imag();
auto dot = y0.real() * y1.real() + y0.imag() * y1.imag();
ASSERT_NEAR(1.0f, r, 0.01f);
ASSERT_NEAR(1.0f, v, 0.01f);
ASSERT_NEAR(0.0f, dot, 0.01f);
Expand Down

0 comments on commit b49e2b4

Please sign in to comment.