Panda3D
eggAnimData.cxx
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file eggAnimData.cxx
10  * @author drose
11  * @date 1999-02-19
12  */
13 
14 #include "eggAnimData.h"
15 
16 TypeHandle EggAnimData::_type_handle;
17 
18 /**
19  * Rounds each element of the table to the nearest multiple of quantum.
20  */
21 void EggAnimData::
22 quantize(double quantum) {
23  for (size_t i = 0; i < _data.size(); i++) {
24  _data[i] = floor(_data[i] / quantum + 0.5) * quantum;
25  }
26 }
void quantize(double quantum)
Rounds each element of the table to the nearest multiple of quantum.
Definition: eggAnimData.cxx:22
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81