diff options
author | Sean Dague | 2007-09-17 12:52:03 +0000 |
---|---|---|
committer | Sean Dague | 2007-09-17 12:52:03 +0000 |
commit | b8d9737a47696952bedec33dface8f18df47341f (patch) | |
tree | 9279f45510f8a9285ac5b9c9165ab6c741009eac /OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD | |
parent | I think this is the last bits for a consistant pristine (diff) | |
download | opensim-SC_OLD-b8d9737a47696952bedec33dface8f18df47341f.zip opensim-SC_OLD-b8d9737a47696952bedec33dface8f18df47341f.tar.gz opensim-SC_OLD-b8d9737a47696952bedec33dface8f18df47341f.tar.bz2 opensim-SC_OLD-b8d9737a47696952bedec33dface8f18df47341f.tar.xz |
fixing me some line endings
Diffstat (limited to 'OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD')
-rw-r--r-- | OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Tools/Tools.cs | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Tools/Tools.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Tools/Tools.cs index 3f7ab68..60dbf62 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Tools/Tools.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Tools/Tools.cs | |||
@@ -1,52 +1,52 @@ | |||
1 | /* | 1 | /* |
2 | Redistribution and use in source and binary forms, with or without | 2 | Redistribution and use in source and binary forms, with or without |
3 | modification, are permitted provided that the following conditions are | 3 | modification, are permitted provided that the following conditions are |
4 | met: | 4 | met: |
5 | 5 | ||
6 | * Redistributions of source code must retain the above copyright | 6 | * Redistributions of source code must retain the above copyright |
7 | notice, this list of conditions and the following disclaimer. | 7 | notice, this list of conditions and the following disclaimer. |
8 | 8 | ||
9 | * Redistributions in binary form must reproduce the above | 9 | * Redistributions in binary form must reproduce the above |
10 | copyright notice, this list of conditions and the following | 10 | copyright notice, this list of conditions and the following |
11 | disclaimer in the documentation and/or other materials provided | 11 | disclaimer in the documentation and/or other materials provided |
12 | with the distribution. | 12 | with the distribution. |
13 | 13 | ||
14 | * Neither the name of libTerrain nor the names of | 14 | * Neither the name of libTerrain nor the names of |
15 | its contributors may be used to endorse or promote products | 15 | its contributors may be used to endorse or promote products |
16 | derived from this software without specific prior written | 16 | derived from this software without specific prior written |
17 | permission. | 17 | permission. |
18 | 18 | ||
19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
20 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | 20 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
21 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | 21 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
22 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 22 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
23 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 23 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
24 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 24 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
25 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
26 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
27 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 | */ | 30 | */ |
31 | 31 | ||
32 | using System; | 32 | using System; |
33 | using System.Collections.Generic; | 33 | using System.Collections.Generic; |
34 | using System.Text; | 34 | using System.Text; |
35 | 35 | ||
36 | namespace libTerrain | 36 | 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 | public static double exponentialInterpolate(double a, double b, double amount) |
45 | { | 45 | { |
46 | a = Math.Pow(a, amount); | 46 | a = Math.Pow(a, amount); |
47 | b = Math.Pow(b - a, 1.0 - amount); | 47 | b = Math.Pow(b - a, 1.0 - amount); |
48 | return a+b; | 48 | return a+b; |
49 | } | 49 | } |
50 | public static int powerOf2Log2(int n) { | 50 | public static int powerOf2Log2(int n) { |
51 | for (int i = 0; i < 31; i++) { | 51 | for (int i = 0; i < 31; i++) { |
52 | if ((n & 1) == 1) { | 52 | if ((n & 1) == 1) { |
@@ -55,6 +55,6 @@ namespace libTerrain | |||
55 | n >>= 1; | 55 | n >>= 1; |
56 | } | 56 | } |
57 | return 0; | 57 | return 0; |
58 | } | 58 | } |
59 | } | 59 | } |
60 | } | 60 | } |