.. index:: pair: namespace; EE::Math .. _doxid-namespace_e_e_1_1_math: namespace EE::Math ================== .. toctree:: :hidden: namespace_EE_Math_easing.rst class_EE_Math_Ease.rst class_EE_Math_Interpolation1d.rst class_EE_Math_Interpolation2d.rst class_EE_Math_Line2.rst class_EE_Math_MTRand.rst class_EE_Math_PerlinNoise.rst class_EE_Math_Polygon2.rst class_EE_Math_Quad2.rst class_EE_Math_Transform.rst class_EE_Math_Transformable.rst class_EE_Math_Triangle2.rst class_EE_Math_Vector2.rst class_EE_Math_Vector3.rst class_EE_Math_tOriginPoint.rst class_EE_Math_tPoint1d.rst class_EE_Math_tPoint2d.rst class_EE_Math_tRECT.rst class_EE_Math_tSize.rst Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block namespace Math { // namespaces namespace :ref:`EE::Math::easing`; // typedefs typedef :ref:`tPoint1d`<:ref:`Float`> :target:`Point1d`; typedef :ref:`tPoint2d`<:ref:`Float`> :target:`Point2d`; typedef :ref:`Line2`<:ref:`Float`> :target:`Line2f`; typedef :ref:`tOriginPoint`<:ref:`Float`> :target:`OriginPoint`; typedef :ref:`Polygon2`<:ref:`Float`> :target:`Polygon2f`; typedef :ref:`Quad2`<:ref:`Float`> :target:`Quad2f`; typedef :ref:`tRECT` :target:`Rectu`; typedef :ref:`tRECT`<:ref:`Float`> :target:`Rectf`; typedef :ref:`tRECT` :target:`Rect`; typedef :ref:`tSize` :target:`Sizei`; typedef :ref:`tSize` :target:`Sizeu`; typedef :ref:`tSize`<:ref:`Float`> :target:`Sizef`; typedef :ref:`Triangle2`<:ref:`Float`> :target:`Triangle2f`; typedef :ref:`Vector2`<:ref:`Int32`> :target:`Vector2if`; typedef :ref:`Vector2` :target:`Vector2i`; typedef :ref:`Vector2`<:ref:`Float`> :target:`Vector2f`; typedef :ref:`Vector2` :target:`Vector2d`; typedef :ref:`Vector2` :target:`Vector2ff`; typedef :ref:`Vector2`<:ref:`Uint32`> :target:`Vector2u`; typedef :ref:`Vector3` :target:`Vector3i`; typedef :ref:`Vector3`<:ref:`Float`> :target:`Vector3f`; typedef :ref:`Vector3` :target:`Vector3d`; typedef :ref:`Vector3` :target:`Vector3ff`; // classes class :ref:`Ease`; class :ref:`Interpolation1d`; class :ref:`Interpolation2d`; template class :ref:`Line2`; class :ref:`MTRand`; class :ref:`PerlinNoise`; template class :ref:`Polygon2`; template class :ref:`Quad2`; class :ref:`Transform`; class :ref:`Transformable`; template class :ref:`Triangle2`; template class :ref:`Vector2`; template class :ref:`Vector3`; template class :ref:`tOriginPoint`; template class :ref:`tPoint1d`; template class :ref:`tPoint2d`; template class :ref:`tRECT`; template class :ref:`tSize`; // global functions :ref:`Uint32` :ref:`setRandomSeed`(:ref:`Uint32` seed); :ref:`Float` :ref:`randf`(const :ref:`Float`& fMin = 0.0f, const :ref:`Float`& fMax = 1.0f); int :ref:`randi`(const int& fMin = 0, const int& fMax = 1); :ref:`Float` :ref:`cosAng`(const :ref:`Float`& Ang); :ref:`Float` :ref:`sinAng`(const :ref:`Float`& Ang); :ref:`Float` :ref:`tanAng`(const :ref:`Float`& Ang); :ref:`Float` :ref:`radians`(const :ref:`Float`& Ang); :ref:`Float` :ref:`degrees`(const :ref:`Float`& Radians); template T :ref:`nextPowOfTwo`(T Size); template T :ref:`isPow2`(T v); template T :ref:`round`(T r); template T :ref:`roundUp`(T r); template T :ref:`roundDown`(T x); template static T :ref:`countDigits`(T num); template bool :target:`operator==`(const :ref:`tRECT`& R1, const :ref:`tRECT`& R2); template bool :target:`operator!=`(const :ref:`tRECT`& R1, const :ref:`tRECT`& R2); template :ref:`tRECT` :target:`operator+`(const :ref:`tRECT`& R, T X); template :ref:`tRECT`& :target:`operator+=`(:ref:`tRECT`& R, T X); template :ref:`tRECT` :target:`operator-`(const :ref:`tRECT`& R, T X); template :ref:`tRECT`& :target:`operator-=`(:ref:`tRECT`& R, T X); template :ref:`tRECT` :target:`operator+`(const :ref:`tRECT`& R, :ref:`tRECT` X); template :ref:`tRECT`& :target:`operator+=`(:ref:`tRECT`& R, :ref:`tRECT` X); template :ref:`tRECT` :target:`operator-`(const :ref:`tRECT`& R, :ref:`tRECT` X); template :ref:`tRECT`& :target:`operator-=`(:ref:`tRECT`& R, :ref:`tRECT` X); template :ref:`tRECT` :target:`operator*`(const :ref:`tRECT`& R, Y X); template :ref:`tRECT`& :target:`operator*=`(:ref:`tRECT`& R, Y X); template :ref:`tRECT`& :target:`operator*`(:ref:`tRECT`& R, Y X); template :ref:`tRECT` :target:`operator/`(const :ref:`tRECT`& R, Y X); template :ref:`tRECT`& :target:`operator/=`(:ref:`tRECT`& R, Y X); template :ref:`tRECT`& :target:`operator/`(:ref:`tRECT`& R, Y X); template :ref:`Vector2` :target:`operator-`(:ref:`Vector2` X, const :ref:`tRECT`& R); template :ref:`Vector2` :target:`operator+`(:ref:`Vector2` X, const :ref:`tRECT`& R); :ref:`EE_API` :ref:`Transform` :target:`operator*`(const :ref:`Transform`& left, const :ref:`Transform`& right); :ref:`EE_API` :ref:`Transform`& :target:`operator*=`(:ref:`Transform`& left, const :ref:`Transform`& right); :ref:`EE_API` :ref:`Vector2f` :target:`operator*`(const :ref:`Transform`& left, const :ref:`Vector2f`& right); :ref:`EE_API` bool :target:`operator==`(const :ref:`Transform`& left, const :ref:`Transform`& right); :ref:`EE_API` bool :target:`operator!=`(const :ref:`Transform`& left, const :ref:`Transform`& right); template :ref:`Vector2` :target:`operator-`(const :ref:`Vector2`& V); template :ref:`Vector2`& :target:`operator+=`(:ref:`Vector2`& V1, const :ref:`Vector2`& V2); template :ref:`Vector2`& :target:`operator-=`(:ref:`Vector2`& V1, const :ref:`Vector2`& V2); template :ref:`Vector2` :target:`operator+`(const :ref:`Vector2`& V1, const :ref:`Vector2`& V2); template :ref:`Vector2` :target:`operator+`(const :ref:`Vector2`& V1, T X); template :ref:`Vector2` :target:`operator-`(const :ref:`Vector2`& V1, const :ref:`Vector2`& V2); template :ref:`Vector2` :target:`operator-`(const :ref:`Vector2`& V1, T X); template :ref:`Vector2` :target:`operator*`(const :ref:`Vector2`& V, T X); template :ref:`Vector2` :target:`operator*`(T X, const :ref:`Vector2`& V); template :ref:`Vector2` :target:`operator*`(const :ref:`Vector2`& V1, const :ref:`Vector2`& V2); template :ref:`Vector2`& :target:`operator*=`(:ref:`Vector2`& V, T X); template :ref:`Vector2`& :target:`operator*=`(:ref:`Vector2`& V, const :ref:`Vector2`& V2); template :ref:`Vector2` :target:`operator/`(const :ref:`Vector2`& V1, const :ref:`Vector2`& V2); template :ref:`Vector2` :target:`operator/`(const :ref:`Vector2`& V, T X); template :ref:`Vector2`& :target:`operator/=`(:ref:`Vector2`& V, T X); template bool :target:`operator==`(const :ref:`Vector2`& V1, const :ref:`Vector2`& V2); template bool :target:`operator==`(const :ref:`Vector2`& V1, const T& V); template bool :target:`operator==`(const T& V, const :ref:`Vector2`& V1); template bool :target:`operator!=`(const :ref:`Vector2`& V1, const :ref:`Vector2`& V2); template bool :target:`operator!=`(const :ref:`Vector2`& V1, const T& V); template bool :target:`operator!=`(const T& V, const :ref:`Vector2`& V1); template bool :target:`operator<`(const :ref:`Vector2`& V1, const :ref:`Vector2`& V2); template bool :target:`operator>`(const :ref:`Vector2`& V1, const :ref:`Vector2`& V2); template bool :target:`operator<=`(const :ref:`Vector2`& V1, const :ref:`Vector2`& V2); template bool :target:`operator>=`(const :ref:`Vector2`& V1, const :ref:`Vector2`& V2); template :ref:`Vector3` :target:`operator-`(const :ref:`Vector3`& V); template :ref:`Vector3`& :target:`operator+=`(:ref:`Vector3`& V1, const :ref:`Vector3`& V2); template :ref:`Vector3`& :target:`operator-=`(:ref:`Vector3`& V1, const :ref:`Vector3`& V2); template :ref:`Vector3` :target:`operator+`(const :ref:`Vector3`& V1, const :ref:`Vector3`& V2); template :ref:`Vector3` :target:`operator-`(const :ref:`Vector3`& V1, const :ref:`Vector3`& V2); template :ref:`Vector3` :target:`operator*`(const :ref:`Vector3`& V, T X); template :ref:`Vector3` :target:`operator*`(T X, const :ref:`Vector3`& V); template :ref:`Vector3`& :target:`operator*=`(:ref:`Vector3`& V, T X); template :ref:`Vector3` :target:`operator/`(const :ref:`Vector3`& V, T X); template :ref:`Vector3`& :target:`operator/=`(:ref:`Vector3`& V, T X); template bool :target:`operator==`(const :ref:`Vector3`& V1, const :ref:`Vector3`& V2); template bool :target:`operator!=`(const :ref:`Vector3`& V1, const :ref:`Vector3`& V2); } // namespace Math .. _details-namespace_e_e_1_1_math: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Global Functions ---------------- .. index:: pair: function; setRandomSeed .. _doxid-namespace_e_e_1_1_math_1a1e2744c780def9be0f6c64484933f7f5: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Uint32` setRandomSeed(:ref:`Uint32` seed) Set a Random Seed to the Randomizer .. index:: pair: function; randf .. _doxid-namespace_e_e_1_1_math_1af03049bffa4c85e26cbdb27d551096c1: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Float` randf(const :ref:`Float`& fMin = 0.0f, const :ref:`Float`& fMax = 1.0f) Generate a floating point random number .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - fMin - The minimun value * - fMax - the maximun value .. rubric:: Returns: The random number generated .. index:: pair: function; randi .. _doxid-namespace_e_e_1_1_math_1a263df2310edb3d7e256ea390744bab7c: .. ref-code-block:: cpp :class: doxyrest-title-code-block int randi(const int& fMin = 0, const int& fMax = 1) Generate a integer random number .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - fMin - The minimun value * - fMax - the maximun value .. rubric:: Returns: The random number generated .. index:: pair: function; cosAng .. _doxid-namespace_e_e_1_1_math_1ad358b4b565e5252d1b1ad949ced55189: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Float` cosAng(const :ref:`Float`& Ang) Cosine from an Angle in Degress .. index:: pair: function; sinAng .. _doxid-namespace_e_e_1_1_math_1a972e65211fc168328dd0623e10c96e64: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Float` sinAng(const :ref:`Float`& Ang) Sinus from an Angle in Degress .. index:: pair: function; tanAng .. _doxid-namespace_e_e_1_1_math_1a755de4c0128305541f309bc43e41b53b: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Float` tanAng(const :ref:`Float`& Ang) Tangen from an Angle in Degress .. index:: pair: function; radians .. _doxid-namespace_e_e_1_1_math_1a4c8708b9558059f28ce670f264b211da: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Float` radians(const :ref:`Float`& Ang) Convert an Angle from Degrees to Radians .. index:: pair: function; degrees .. _doxid-namespace_e_e_1_1_math_1a547cab66b1605b75c314f18127dcd53b: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Float` degrees(const :ref:`Float`& Radians) Convert an Angle from Math::Radians to Degrees .. index:: pair: function; nextPowOfTwo .. _doxid-namespace_e_e_1_1_math_1a81c25b261468764ba7cabae78a187fc8: .. ref-code-block:: cpp :class: doxyrest-title-code-block template T nextPowOfTwo(T Size) .. rubric:: Returns: The next power of two of the given Size .. index:: pair: function; isPow2 .. _doxid-namespace_e_e_1_1_math_1aae585d8f660fc5679a0b23a5a6c119b4: .. ref-code-block:: cpp :class: doxyrest-title-code-block template T isPow2(T v) .. rubric:: Returns: If the number given is power of two .. index:: pair: function; round .. _doxid-namespace_e_e_1_1_math_1aa5dabf10b3d9e500dcf42173fe339519: .. ref-code-block:: cpp :class: doxyrest-title-code-block template T round(T r) Round the number .. index:: pair: function; roundUp .. _doxid-namespace_e_e_1_1_math_1ab2bf2a8376145ef164bef8c8f455e695: .. ref-code-block:: cpp :class: doxyrest-title-code-block template T roundUp(T r) Round the number always to the upper value .. index:: pair: function; roundDown .. _doxid-namespace_e_e_1_1_math_1acd82c297b161145b4e156e25f79f1c4a: .. ref-code-block:: cpp :class: doxyrest-title-code-block template T roundDown(T x) Round the number always to the lower value .. index:: pair: function; countDigits .. _doxid-namespace_e_e_1_1_math_1a797f3e0eeaf4738a098b3f8ce3453732: .. ref-code-block:: cpp :class: doxyrest-title-code-block template static T countDigits(T num) .. rubric:: Returns: The number of digits in a number.