aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/Synth.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Minecraft.World/Synth.cpp')
-rw-r--r--Minecraft.World/Synth.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/Minecraft.World/Synth.cpp b/Minecraft.World/Synth.cpp
new file mode 100644
index 00000000..c6e926e5
--- /dev/null
+++ b/Minecraft.World/Synth.cpp
@@ -0,0 +1,15 @@
+#include "stdafx.h"
+#include "Synth.h"
+
+doubleArray Synth::create(int width, int height)
+{
+ doubleArray result = doubleArray(width * height);
+ for (int y = 0; y < height; y++)
+ {
+ for (int x = 0; x < width; x++)
+ {
+ result[x + y * width] = getValue(x, y);
+ }
+ }
+ return result;
+}