From 67e12b95ea7b68f4904a7484d77ecfd787d16d0c Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 30 Oct 2007 09:05:31 +0000 Subject: * Optimized usings * Shortened type references * Removed redundant 'this' qualifier --- .../Channel/Manipulators/ThermalWeathering.cs | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/ThermalWeathering.cs') diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/ThermalWeathering.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/ThermalWeathering.cs index 9148c3c..0ca3d48 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/ThermalWeathering.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/ThermalWeathering.cs @@ -26,10 +26,6 @@ * */ -using System; -using System.Collections.Generic; -using System.Text; - namespace libTerrain { partial class Channel @@ -47,10 +43,11 @@ namespace libTerrain double[,] lastFrame; double[,] thisFrame; - lastFrame = (double[,])map.Clone(); - thisFrame = (double[,])map.Clone(); + lastFrame = (double[,]) map.Clone(); + thisFrame = (double[,]) map.Clone(); - NeighbourSystem type = NeighbourSystem.Moore; // Using moore neighbourhood (twice as computationally expensive) + NeighbourSystem type = NeighbourSystem.Moore; + // Using moore neighbourhood (twice as computationally expensive) int NEIGHBOUR_ME = 4; // I am always 4 in both systems. int NEIGHBOUR_MAX = type == NeighbourSystem.Moore ? 9 : 5; @@ -88,19 +85,18 @@ namespace libTerrain if (target > heightF + talus) { - double calc = c * ((target - heightF) - talus); + double calc = c*((target - heightF) - talus); heightF += calc; target -= calc; } thisFrame[x, y] = heightF; thisFrame[coords[0], coords[1]] = target; - } } } } - lastFrame = (double[,])thisFrame.Clone(); + lastFrame = (double[,]) thisFrame.Clone(); } map = thisFrame; @@ -109,4 +105,4 @@ namespace libTerrain return this; } } -} +} \ No newline at end of file -- cgit v1.1