Browse Source

Tabs to spaces + other code formatting.

Lasse Öörni 12 years ago
parent
commit
c1205473d4
2 changed files with 8 additions and 8 deletions
  1. 7 7
      Source/Engine/Math/Random.cpp
  2. 1 1
      Source/Engine/Script/MathAPI.cpp

+ 7 - 7
Source/Engine/Math/Random.cpp

@@ -46,13 +46,13 @@ int Rand()
 
 
 float RandStandardNormal()
 float RandStandardNormal()
 {
 {
-	float val = 0.0f;
-	for(int i = 0; i < 12; i++) {
-		val += Rand() / 32768.0f;
-	}
-	val -= 6.0f;
-	// now val is approximatly standard normal distributed.
-	return val;
+    float val = 0.0f;
+    for (int i = 0; i < 12; i++)
+        val += Rand() / 32768.0f;
+    val -= 6.0f;
+    
+    // Now val is approximatly standard normal distributed
+    return val;
 }
 }
 
 
 }
 }

+ 1 - 1
Source/Engine/Script/MathAPI.cpp

@@ -82,7 +82,7 @@ static void RegisterMathFunctions(asIScriptEngine* engine)
     engine->RegisterGlobalFunction("int RandomInt()", asFUNCTION(Rand), asCALL_CDECL);
     engine->RegisterGlobalFunction("int RandomInt()", asFUNCTION(Rand), asCALL_CDECL);
     engine->RegisterGlobalFunction("int RandomInt(int)", asFUNCTIONPR(Random, (int), int), asCALL_CDECL);
     engine->RegisterGlobalFunction("int RandomInt(int)", asFUNCTIONPR(Random, (int), int), asCALL_CDECL);
     engine->RegisterGlobalFunction("int RandomInt(int, int)", asFUNCTIONPR(Random, (int, int), int), asCALL_CDECL);
     engine->RegisterGlobalFunction("int RandomInt(int, int)", asFUNCTIONPR(Random, (int, int), int), asCALL_CDECL);
-	engine->RegisterGlobalFunction("float RandomNormal(float, float)", asFUNCTIONPR(RandomNormal, (float, float), float), asCALL_CDECL);
+    engine->RegisterGlobalFunction("float RandomNormal(float, float)", asFUNCTIONPR(RandomNormal, (float, float), float), asCALL_CDECL);
     engine->RegisterGlobalFunction("void SetRandomSeed(uint)", asFUNCTION(SetRandomSeed), asCALL_CDECL);
     engine->RegisterGlobalFunction("void SetRandomSeed(uint)", asFUNCTION(SetRandomSeed), asCALL_CDECL);
     engine->RegisterGlobalFunction("uint GetRandomSeed()", asFUNCTION(GetRandomSeed), asCALL_CDECL);
     engine->RegisterGlobalFunction("uint GetRandomSeed()", asFUNCTION(GetRandomSeed), asCALL_CDECL);
 }
 }