diff options
author | Adam Frisby | 2007-09-25 11:48:43 +0000 |
---|---|---|
committer | Adam Frisby | 2007-09-25 11:48:43 +0000 |
commit | 569ba9eb9acb9f024060a41ee4188a11aafa3fa7 (patch) | |
tree | 63cec15a6c0338a8777640ed13fd7c3ce05eeba7 /OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Tools | |
parent | fix order issue with prebuild.xml, we need to build Local before (diff) | |
download | opensim-SC-569ba9eb9acb9f024060a41ee4188a11aafa3fa7.zip opensim-SC-569ba9eb9acb9f024060a41ee4188a11aafa3fa7.tar.gz opensim-SC-569ba9eb9acb9f024060a41ee4188a11aafa3fa7.tar.bz2 opensim-SC-569ba9eb9acb9f024060a41ee4188a11aafa3fa7.tar.xz |
Terrain:
* Attempted fix for lag/pause when doing lots of updates.
* Some naming fixes to libTerrain.
* Refactored terrain bitmap generation into a common call for both world map and export.
General:
* Switched some calls to Console.WriteLine to use MainLog.Warn/Verbose/Notice.
Diffstat (limited to 'OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Tools')
-rw-r--r-- | OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Tools/Tools.cs | 8 |
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; |