aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Tools/Tools.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Tools/Tools.cs')
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Tools/Tools.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Tools/Tools.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Tools/Tools.cs
index 60dbf62..13338a2 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Tools/Tools.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Tools/Tools.cs
@@ -37,17 +37,19 @@ namespace libTerrain
37{ 37{
38 class Tools 38 class Tools
39 { 39 {
40 public static double linearInterpolate(double a, double b, double amount) 40 public static double LinearInterpolate(double a, double b, double amount)
41 { 41 {
42 return a + ((b - a) * amount); 42 return a + ((b - a) * amount);
43 } 43 }
44 public static double exponentialInterpolate(double a, double b, double amount) 44
45 public static double ExponentialInterpolate(double a, double b, double amount)
45 { 46 {
46 a = Math.Pow(a, amount); 47 a = Math.Pow(a, amount);
47 b = Math.Pow(b - a, 1.0 - amount); 48 b = Math.Pow(b - a, 1.0 - amount);
48 return a+b; 49 return a+b;
49 } 50 }
50 public static int powerOf2Log2(int n) { 51
52 public static int PowerOf2Log2(int n) {
51 for (int i = 0; i < 31; i++) { 53 for (int i = 0; i < 31; i++) {
52 if ((n & 1) == 1) { 54 if ((n & 1) == 1) {
53 return i; 55 return i;