Browse Source

Moved const values to top of function

weinand 9 years ago
parent
commit
937a38bb59
1 changed files with 7 additions and 7 deletions
  1. 7 7
      Source/AtomicEditor/Editors/SceneEditor3D/SceneView3D.cpp

+ 7 - 7
Source/AtomicEditor/Editors/SceneEditor3D/SceneView3D.cpp

@@ -186,6 +186,13 @@ void SceneView3D::CheckCameraSpeedBounds()
 
 void SceneView3D::MoveCamera(float timeStep)
 {
+    // Mouse sensitivity as degrees per pixel
+    const float MOUSE_SENSITIVITY = 0.2f;
+    // Tempo at which mouse speed increases using mousewheel
+    const float CAMERA_MOVE_TEMPO = 5.0f;
+    // Tempo used when zooming in and out
+    const float ZOOM_TEMPO = 0.6f;
+
     if (!enabled_ && !GetFocus())
         return;
 
@@ -199,13 +206,6 @@ void SceneView3D::MoveCamera(float timeStep)
     bool zooming = GetZooming();
     bool changingCameraSpeed = GetChangingCameraSpeed();
 
-    // Mouse sensitivity as degrees per pixel
-    const float MOUSE_SENSITIVITY = 0.2f;
-    // Tempo at which mouse speed increases using mousewheel
-    const float CAMERA_MOVE_TEMPO = 5.0f;
-    // Tempo used when zooming in and out
-    const float ZOOM_TEMPO = 0.6f;
-
     // Use this frame's mouse motion to adjust camera node yaw and pitch. Clamp the pitch between -90 and 90 degrees
     if ((mouseInView && input->GetMouseButtonDown(MOUSEB_RIGHT)) || orbitting)
     {