Fix issue in Rocket.lua script.
[Cafu-Engine.git] / Libs / Math3D / Misc.hpp
blobe18fda2611830cd5c189ca48c6c2db3adb9f94d4
1 /*
2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
5 */
7 #ifndef CAFU_MATH_MISC_HPP_INCLUDED
8 #define CAFU_MATH_MISC_HPP_INCLUDED
11 template<class T> class Vector3T;
14 namespace cf
16 namespace math
18 float round(float f); ///< Rounds the given number to the nearest integer.
19 double round(double d); ///< Rounds the given number to the nearest integer.
21 /// Rounds all components of the given vector to the nearest integer.
22 template<class T> Vector3T<T> round(const Vector3T<T>& v)
24 return Vector3T<T>(round(v.x), round(v.y), round(v.z));
29 #endif