diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-10-21 18:30:16 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-10-21 18:30:16 +0100 |
commit | 56100b1c4cb02db7608763dddd77f8052a533dae (patch) | |
tree | ea8322a78134e1eb9ecca3e34672313cb5740ad5 /game/network/network.cpp | |
parent | Randomise for many trees, positions, rotations (diff) | |
download | ilt-56100b1c4cb02db7608763dddd77f8052a533dae.tar.bz2 ilt-56100b1c4cb02db7608763dddd77f8052a533dae.tar.xz ilt-56100b1c4cb02db7608763dddd77f8052a533dae.zip |
Further template maths functions
Diffstat (limited to 'game/network/network.cpp')
-rw-r--r-- | game/network/network.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/game/network/network.cpp b/game/network/network.cpp index fa86cb5..6ba3ed6 100644 --- a/game/network/network.cpp +++ b/game/network/network.cpp @@ -121,16 +121,16 @@ Network::genCurveDef(const GlobalPosition3D & start, const GlobalPosition3D & en }; if (const auto radii = find_arcs_radius(flatStart, startDir, flatEnd, endDir); radii.first < radii.second) { const auto radius {radii.first}; - const auto c1 = flatStart + (sincosf(startDir + half_pi) * radius); - const auto c2 = flatEnd + (sincosf(endDir + half_pi) * radius); + const auto c1 = flatStart + (sincos(startDir + half_pi) * radius); + const auto c2 = flatEnd + (sincos(endDir + half_pi) * radius); const auto mid = (c1 + c2) / 2; const auto midh = mid || midheight(mid); return {{start, midh, c1}, {end, midh, c2}}; } else { const auto radius {radii.second}; - const auto c1 = flatStart + (sincosf(startDir - half_pi) * radius); - const auto c2 = flatEnd + (sincosf(endDir - half_pi) * radius); + const auto c1 = flatStart + (sincos(startDir - half_pi) * radius); + const auto c2 = flatEnd + (sincos(endDir - half_pi) * radius); const auto mid = (c1 + c2) / 2; const auto midh = mid || midheight(mid); return {{midh, start, c1}, {midh, end, c2}}; |