diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-11-18 20:39:54 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-11-18 20:39:54 +0000 |
commit | ba770a85b2b0ff9222e2867689c693ebee841e55 (patch) | |
tree | 179908c62b1ca5d18c9d7c33a3aa641002b479e8 /game | |
parent | Simplified texture save (diff) | |
download | ilt-ba770a85b2b0ff9222e2867689c693ebee841e55.tar.bz2 ilt-ba770a85b2b0ff9222e2867689c693ebee841e55.tar.xz ilt-ba770a85b2b0ff9222e2867689c693ebee841e55.zip |
Rename rdiv to ratio and add a vec2 override
Diffstat (limited to 'game')
-rw-r--r-- | game/geoData.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/game/geoData.cpp b/game/geoData.cpp index 25c7131..af39ce3 100644 --- a/game/geoData.cpp +++ b/game/geoData.cpp @@ -43,7 +43,7 @@ GeoData::generateRandom() for (auto x = lim1.x; x < lim2.x; x += 1) { const auto dist {hpos - glm::ivec2 {x, y}}; const glm::ivec2 distsqrd {dist.x * dist.x, dist.y * dist.y}; - const auto out {rdiv(sq(x - hpos.x), sq(hsize.x)) + rdiv(sq(y - hpos.y), sq(hsize.y))}; + const auto out {ratio(sq(x - hpos.x), sq(hsize.x)) + ratio(sq(y - hpos.y), sq(hsize.y))}; if (out <= 1.0F) { auto & node {nodes[at({x, y})]}; const auto m {1.F / (7.F * out - 8.F) + 1.F}; |