Browse Source

use flt consts

cxgeorge 24 years ago
parent
commit
d0b06c15f7
3 changed files with 9 additions and 9 deletions
  1. 2 2
      panda/src/device/analogNode.cxx
  2. 1 1
      panda/src/device/clientBase.cxx
  3. 6 6
      panda/src/device/mouse.cxx

+ 2 - 2
panda/src/device/analogNode.cxx

@@ -55,7 +55,7 @@ AnalogNode(ClientBase *client, const string &device_name) :
 
   _analog = DCAST(ClientAnalogDevice, device);
 
-  _xyz = new Vec3DataTransition(LPoint3f(0, 0, 0));
+  _xyz = new Vec3DataTransition(LPoint3f(0.0f, 0.0f, 0.0f));
   _attrib.set_transition(_xyz_type, _xyz);
 }
 
@@ -97,7 +97,7 @@ transmit_data(AllTransitionsWrapper &data) {
   if (is_valid()) {
     _analog->poll();
 
-    LPoint3f out(0.0, 0.0, 0.0);
+    LPoint3f out(0.0f, 0.0f, 0.0f);
 
     _analog->lock();
     for (int i = 0; i < max_outputs; i++) {

+ 1 - 1
panda/src/device/clientBase.cxx

@@ -30,7 +30,7 @@ TypeHandle ClientBase::_type_handle;
 ClientBase::
 ClientBase() {
   _forked = false;
-  _last_poll_time = 0.0;
+  _last_poll_time = 0.0f;
   _last_poll_frame = 0;
 
 #ifdef HAVE_IPC

+ 6 - 6
panda/src/device/mouse.cxx

@@ -43,8 +43,8 @@ MouseAndKeyboard(GraphicsWindow *window, int device, const string& name) :
   _window(window),
   _device(device)
 {
-  _pixel_xyz = new Vec3DataTransition(LPoint3f(0, 0, 0));
-  _xyz = new Vec3DataTransition(LPoint3f(0, 0, 0));
+  _pixel_xyz = new Vec3DataTransition(LPoint3f(0.0f, 0.0f, 0.0f));
+  _xyz = new Vec3DataTransition(LPoint3f(0.0f, 0.0f, 0.0f));
   _button_events = new ButtonEventDataTransition();
 
   _got_mouse_attrib.set_transition(_pixel_xyz_type, _pixel_xyz);
@@ -73,16 +73,16 @@ transmit_data(AllTransitionsWrapper &data) {
 
     if (mdata._in_window) {
       // Get motion
-      _pixel_xyz->set_value(LPoint3f(mdata._xpos, mdata._ypos, 0));
+      _pixel_xyz->set_value(LPoint3f(mdata._xpos, mdata._ypos, 0.0f));
 
       int w = _window->get_width();
       int h = _window->get_height();
 
       // Scale to range [-1,1]
-      float xf = (float)(2 * mdata._xpos) / (float)w - 1.0;
-      float yf = 1.0 - (float)(2 * mdata._ypos) / (float)h;
+      float xf = (float)(2 * mdata._xpos) / (float)w - 1.0f;
+      float yf = 1.0f - (float)(2 * mdata._ypos) / (float)h;
 
-      _xyz->set_value(LPoint3f(xf, yf, 0));
+      _xyz->set_value(LPoint3f(xf, yf, 0.0f));
       data = _got_mouse_attrib;
 
     } else {