From dc787e1d968058a810ad379013f84c82ea78b2fa Mon Sep 17 00:00:00 2001 From: NiLSPACE Date: Sun, 22 Dec 2019 23:38:11 +0100 Subject: Improved large jungle and acacia tree generation (#4413) --- Tools/GrownBiomeGenVisualiser/Globals.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'Tools/GrownBiomeGenVisualiser') diff --git a/Tools/GrownBiomeGenVisualiser/Globals.h b/Tools/GrownBiomeGenVisualiser/Globals.h index 11adc2f53..a920294cc 100644 --- a/Tools/GrownBiomeGenVisualiser/Globals.h +++ b/Tools/GrownBiomeGenVisualiser/Globals.h @@ -70,6 +70,14 @@ +#ifndef TOLUA_TEMPLATE_BIND + #define TOLUA_TEMPLATE_BIND(x) +#endif + + + + + // Integral types with predefined sizes: typedef long long Int64; typedef int Int32; @@ -226,6 +234,20 @@ public: } ; + + + +/** Clamp X to the specified range. */ +template +T Clamp(T a_Value, T a_Min, T a_Max) +{ + return (a_Value < a_Min) ? a_Min : ((a_Value > a_Max) ? a_Max : a_Value); +} + + + + + #include "BiomeDef.h" -- cgit v1.2.3