summaryrefslogtreecommitdiffstats
path: root/src/VoronoiMap.cpp
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2024-11-02 22:27:47 +0100
committerAlexander Harkness <me@bearbin.net>2024-11-02 22:27:47 +0100
commitcb50ec10591c0e0e4b9915e642bc50d3d8d1fd0a (patch)
treef647b20e1823f1846af88e832cf82a4a02e96e69 /src/VoronoiMap.cpp
parentImprove clang-format config file, remove automatically enforced code style from contrib guide. (diff)
downloadcuberite-cb50ec10591c0e0e4b9915e642bc50d3d8d1fd0a.tar
cuberite-cb50ec10591c0e0e4b9915e642bc50d3d8d1fd0a.tar.gz
cuberite-cb50ec10591c0e0e4b9915e642bc50d3d8d1fd0a.tar.bz2
cuberite-cb50ec10591c0e0e4b9915e642bc50d3d8d1fd0a.tar.lz
cuberite-cb50ec10591c0e0e4b9915e642bc50d3d8d1fd0a.tar.xz
cuberite-cb50ec10591c0e0e4b9915e642bc50d3d8d1fd0a.tar.zst
cuberite-cb50ec10591c0e0e4b9915e642bc50d3d8d1fd0a.zip
Diffstat (limited to 'src/VoronoiMap.cpp')
-rw-r--r--src/VoronoiMap.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/VoronoiMap.cpp b/src/VoronoiMap.cpp
index 4c0aab61a..b01122643 100644
--- a/src/VoronoiMap.cpp
+++ b/src/VoronoiMap.cpp
@@ -17,7 +17,8 @@ cVoronoiMap::cVoronoiMap(int a_Seed, int a_CellSize, int a_JitterSize) :
m_CellSize(std::max(a_CellSize, 2)),
m_JitterSize(Clamp(a_JitterSize, 1, a_CellSize)),
m_OddRowOffset(0),
- m_CurrentCellX(9999999), // Cell coords that are definitely out of the range for normal generator, so that the first query will overwrite them
+ m_CurrentCellX(9999999), // Cell coords that are definitely out of the range for normal generator, so that the
+ // first query will overwrite them
m_CurrentCellZ(9999999)
{
}
@@ -80,8 +81,10 @@ int cVoronoiMap::GetValueAt(int a_X, int a_Y, int & a_MinDist)
int cVoronoiMap::GetValueAt(
- int a_X, int a_Y, // Coords to query
- int & a_NearestSeedX, int & a_NearestSeedY, // Coords of the closest cell
+ int a_X,
+ int a_Y, // Coords to query
+ int & a_NearestSeedX,
+ int & a_NearestSeedY, // Coords of the closest cell
int & a_MinDist2 // Distance to the second closest cell
)
{
@@ -129,9 +132,12 @@ int cVoronoiMap::GetValueAt(
void cVoronoiMap::FindNearestSeeds(
- int a_X, int a_Y,
- int & a_NearestSeedX, int & a_NearestSeedY,
- int & a_SecondNearestSeedX, int & a_SecondNearestSeedY
+ int a_X,
+ int a_Y,
+ int & a_NearestSeedX,
+ int & a_NearestSeedY,
+ int & a_SecondNearestSeedX,
+ int & a_SecondNearestSeedY
)
{
int CellX = a_X / m_CellSize;
@@ -206,7 +212,3 @@ void cVoronoiMap::UpdateCell(int a_CellX, int a_CellZ)
m_CurrentCellX = a_CellX;
m_CurrentCellZ = a_CellZ;
}
-
-
-
-