summaryrefslogtreecommitdiff
path: root/game/network/rail.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-10-21 18:30:16 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-10-21 18:30:16 +0100
commit56100b1c4cb02db7608763dddd77f8052a533dae (patch)
treeea8322a78134e1eb9ecca3e34672313cb5740ad5 /game/network/rail.cpp
parentRandomise for many trees, positions, rotations (diff)
downloadilt-56100b1c4cb02db7608763dddd77f8052a533dae.tar.bz2
ilt-56100b1c4cb02db7608763dddd77f8052a533dae.tar.xz
ilt-56100b1c4cb02db7608763dddd77f8052a533dae.zip
Further template maths functions
Diffstat (limited to 'game/network/rail.cpp')
-rw-r--r--game/network/rail.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/game/network/rail.cpp b/game/network/rail.cpp
index c29217a..6f04070 100644
--- a/game/network/rail.cpp
+++ b/game/network/rail.cpp
@@ -45,8 +45,8 @@ RailLinks::addLinksBetween(GlobalPosition3D start, GlobalPosition3D end)
const float dir2 = pi + findNodeDirection(node2ins.first);
if (const auto radii = find_arcs_radius(flatStart, dir, flatEnd, dir2); radii.first < radii.second) {
const auto radius {radii.first};
- const auto c1 = flatStart + (sincosf(dir + half_pi) * radius);
- const auto c2 = flatEnd + (sincosf(dir2 + half_pi) * radius);
+ const auto c1 = flatStart + (sincos(dir + half_pi) * radius);
+ const auto c2 = flatEnd + (sincos(dir2 + half_pi) * radius);
const auto mid = (c1 + c2) / 2;
const auto midh = mid || midheight(mid);
addLink<RailLinkCurve>(start, midh, c1);
@@ -54,8 +54,8 @@ RailLinks::addLinksBetween(GlobalPosition3D start, GlobalPosition3D end)
}
else {
const auto radius {radii.second};
- const auto c1 = flatStart + (sincosf(dir - half_pi) * radius);
- const auto c2 = flatEnd + (sincosf(dir2 - half_pi) * radius);
+ const auto c1 = flatStart + (sincos(dir - half_pi) * radius);
+ const auto c2 = flatEnd + (sincos(dir2 - half_pi) * radius);
const auto mid = (c1 + c2) / 2;
const auto midh = mid || midheight(mid);
addLink<RailLinkCurve>(midh, start, c1);