Commits

Anonymous committed 8698c64

De-intensify the intensity.

Comments (1)

Files changed (1)

HamOntFire.Core/MapGenerator.cs

 
         private static byte GetIntensity(short units)
         {
-            // Intensity is calculated linearly so that 1 Unit = 50 intensity, and 20 (or greater) Units = 120 intensity
+            // Intensity is calculated linearly so that 1 Unit = 10 intensity, and 20 (or greater) Units = 50 intensity
             // Remember Grade 9 math class!  y = Intensity; x = Nbr of Units
+            //  Calculate m
+            //      m = delta y / delta x
+            //      m = (20 - 1) / (50 - 20)
+            //      m = 0.633
+            //
+            //  Calculate b
             //      y = mx + b
-            //      y = (3.684)x + 46.316
-            double y = (3.684*units) + 46.316;
-            if (y > 120)
-                return 120;
+            //      1 = (0.633)(10) + b
+            //      b = 5.33
+            //
+            //      y = mx + b
+            //      y = (0.633)x + 5.33
+            double y = (0.633 * units) + 5.33;
+            if (y > 50)
+                return 50;
             return Convert.ToByte(y);
         }
     }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.