classutil_1_1MyMath.tex 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. \hypertarget{classutil_1_1MyMath}{}\section{util\+:\+:My\+Math Class Reference}
  2. \label{classutil_1_1MyMath}\index{util\+::\+My\+Math@{util\+::\+My\+Math}}
  3. {\ttfamily \#include $<$My\+Math.\+h$>$}
  4. \subsection*{Static Public Member Functions}
  5. \begin{DoxyCompactItemize}
  6. \item
  7. static double \hyperlink{classutil_1_1MyMath_a367a261dc52a85cc97ba376799ed13a3}{Clamp} (double min, double max, double value)
  8. \item
  9. static double \hyperlink{classutil_1_1MyMath_ae68f361889a9929767b0c85ad7a010f1}{Lerp} (double a, double b, double value)
  10. \item
  11. static double \hyperlink{classutil_1_1MyMath_a789c283b324494ab50955af1e35178d5}{Inverse\+Lerp} (double a, double b, double value)
  12. \item
  13. static double \hyperlink{classutil_1_1MyMath_abaf214b2fc7a31e43cf07245cf4b2e1f}{Euclidean\+Distance} (cv\+::\+Point3d a, cv\+::\+Point3d b)
  14. \item
  15. static double \hyperlink{classutil_1_1MyMath_a1e70b6714c4c2c0bf22ede78db7118f2}{Euclidean\+Distance} (cv\+::\+Point2d a, cv\+::\+Point2d b)
  16. \item
  17. static double \hyperlink{classutil_1_1MyMath_aab093b6bf8f989a0d1879ce382e762af}{Radian} (double degree)
  18. \end{DoxyCompactItemize}
  19. \subsection*{Static Public Attributes}
  20. \begin{DoxyCompactItemize}
  21. \item
  22. static const double {\bfseries PI} = 3.\+14159\hypertarget{classutil_1_1MyMath_a0102b31b23c28614b0b48b1e53d23135}{}\label{classutil_1_1MyMath_a0102b31b23c28614b0b48b1e53d23135}
  23. \end{DoxyCompactItemize}
  24. \subsection{Detailed Description}
  25. Utility class for mathematical operations.
  26. \subsection{Member Function Documentation}
  27. \index{util\+::\+My\+Math@{util\+::\+My\+Math}!Clamp@{Clamp}}
  28. \index{Clamp@{Clamp}!util\+::\+My\+Math@{util\+::\+My\+Math}}
  29. \subsubsection[{\texorpdfstring{Clamp(double min, double max, double value)}{Clamp(double min, double max, double value)}}]{\setlength{\rightskip}{0pt plus 5cm}double util\+::\+My\+Math\+::\+Clamp (
  30. \begin{DoxyParamCaption}
  31. \item[{double}]{min, }
  32. \item[{double}]{max, }
  33. \item[{double}]{value}
  34. \end{DoxyParamCaption}
  35. )\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{classutil_1_1MyMath_a367a261dc52a85cc97ba376799ed13a3}{}\label{classutil_1_1MyMath_a367a261dc52a85cc97ba376799ed13a3}
  36. Clamps the value between min and max, both inclusive.
  37. \begin{DoxyParams}{Parameters}
  38. {\em min} & The minimum value \\
  39. \hline
  40. {\em max} & The maximum value \\
  41. \hline
  42. {\em value} & The value to clamp \\
  43. \hline
  44. \end{DoxyParams}
  45. \begin{DoxyReturn}{Returns}
  46. The clamped value
  47. \end{DoxyReturn}
  48. \index{util\+::\+My\+Math@{util\+::\+My\+Math}!Euclidean\+Distance@{Euclidean\+Distance}}
  49. \index{Euclidean\+Distance@{Euclidean\+Distance}!util\+::\+My\+Math@{util\+::\+My\+Math}}
  50. \subsubsection[{\texorpdfstring{Euclidean\+Distance(cv\+::\+Point3d a, cv\+::\+Point3d b)}{EuclideanDistance(cv::Point3d a, cv::Point3d b)}}]{\setlength{\rightskip}{0pt plus 5cm}double util\+::\+My\+Math\+::\+Euclidean\+Distance (
  51. \begin{DoxyParamCaption}
  52. \item[{cv\+::\+Point3d}]{a, }
  53. \item[{cv\+::\+Point3d}]{b}
  54. \end{DoxyParamCaption}
  55. )\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{classutil_1_1MyMath_abaf214b2fc7a31e43cf07245cf4b2e1f}{}\label{classutil_1_1MyMath_abaf214b2fc7a31e43cf07245cf4b2e1f}
  56. Calculates the euclidean distance of the given points.
  57. \begin{DoxyParams}{Parameters}
  58. {\em a} & The first point in 3D space \\
  59. \hline
  60. {\em b} & The second point in 3D space \\
  61. \hline
  62. \end{DoxyParams}
  63. \begin{DoxyReturn}{Returns}
  64. The euclidean distance
  65. \end{DoxyReturn}
  66. \index{util\+::\+My\+Math@{util\+::\+My\+Math}!Euclidean\+Distance@{Euclidean\+Distance}}
  67. \index{Euclidean\+Distance@{Euclidean\+Distance}!util\+::\+My\+Math@{util\+::\+My\+Math}}
  68. \subsubsection[{\texorpdfstring{Euclidean\+Distance(cv\+::\+Point2d a, cv\+::\+Point2d b)}{EuclideanDistance(cv::Point2d a, cv::Point2d b)}}]{\setlength{\rightskip}{0pt plus 5cm}double util\+::\+My\+Math\+::\+Euclidean\+Distance (
  69. \begin{DoxyParamCaption}
  70. \item[{cv\+::\+Point2d}]{a, }
  71. \item[{cv\+::\+Point2d}]{b}
  72. \end{DoxyParamCaption}
  73. )\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{classutil_1_1MyMath_a1e70b6714c4c2c0bf22ede78db7118f2}{}\label{classutil_1_1MyMath_a1e70b6714c4c2c0bf22ede78db7118f2}
  74. Calculates the euclidean distance of the given points.
  75. \begin{DoxyParams}{Parameters}
  76. {\em a} & The first point in 2D space \\
  77. \hline
  78. {\em b} & The second point in 2D space \\
  79. \hline
  80. \end{DoxyParams}
  81. \begin{DoxyReturn}{Returns}
  82. The euclidean distance
  83. \end{DoxyReturn}
  84. \index{util\+::\+My\+Math@{util\+::\+My\+Math}!Inverse\+Lerp@{Inverse\+Lerp}}
  85. \index{Inverse\+Lerp@{Inverse\+Lerp}!util\+::\+My\+Math@{util\+::\+My\+Math}}
  86. \subsubsection[{\texorpdfstring{Inverse\+Lerp(double a, double b, double value)}{InverseLerp(double a, double b, double value)}}]{\setlength{\rightskip}{0pt plus 5cm}double util\+::\+My\+Math\+::\+Inverse\+Lerp (
  87. \begin{DoxyParamCaption}
  88. \item[{double}]{a, }
  89. \item[{double}]{b, }
  90. \item[{double}]{value}
  91. \end{DoxyParamCaption}
  92. )\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{classutil_1_1MyMath_a789c283b324494ab50955af1e35178d5}{}\label{classutil_1_1MyMath_a789c283b324494ab50955af1e35178d5}
  93. Inverse linearly interpolates between a and b at value.
  94. \begin{DoxyParams}{Parameters}
  95. {\em a} & The first value \\
  96. \hline
  97. {\em b} & The second value \\
  98. \hline
  99. {\em value} & The value to get the interpolation of \\
  100. \hline
  101. \end{DoxyParams}
  102. \begin{DoxyReturn}{Returns}
  103. The interpolation value
  104. \end{DoxyReturn}
  105. \index{util\+::\+My\+Math@{util\+::\+My\+Math}!Lerp@{Lerp}}
  106. \index{Lerp@{Lerp}!util\+::\+My\+Math@{util\+::\+My\+Math}}
  107. \subsubsection[{\texorpdfstring{Lerp(double a, double b, double value)}{Lerp(double a, double b, double value)}}]{\setlength{\rightskip}{0pt plus 5cm}double util\+::\+My\+Math\+::\+Lerp (
  108. \begin{DoxyParamCaption}
  109. \item[{double}]{a, }
  110. \item[{double}]{b, }
  111. \item[{double}]{value}
  112. \end{DoxyParamCaption}
  113. )\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{classutil_1_1MyMath_ae68f361889a9929767b0c85ad7a010f1}{}\label{classutil_1_1MyMath_ae68f361889a9929767b0c85ad7a010f1}
  114. Linearly interpolates between a and b at value.
  115. \begin{DoxyParams}{Parameters}
  116. {\em a} & The first value \\
  117. \hline
  118. {\em b} & The second value \\
  119. \hline
  120. {\em value} & The interpolation value \\
  121. \hline
  122. \end{DoxyParams}
  123. \begin{DoxyReturn}{Returns}
  124. The interpolated value
  125. \end{DoxyReturn}
  126. \index{util\+::\+My\+Math@{util\+::\+My\+Math}!Radian@{Radian}}
  127. \index{Radian@{Radian}!util\+::\+My\+Math@{util\+::\+My\+Math}}
  128. \subsubsection[{\texorpdfstring{Radian(double degree)}{Radian(double degree)}}]{\setlength{\rightskip}{0pt plus 5cm}double util\+::\+My\+Math\+::\+Radian (
  129. \begin{DoxyParamCaption}
  130. \item[{double}]{degree}
  131. \end{DoxyParamCaption}
  132. )\hspace{0.3cm}{\ttfamily [static]}}\hypertarget{classutil_1_1MyMath_aab093b6bf8f989a0d1879ce382e762af}{}\label{classutil_1_1MyMath_aab093b6bf8f989a0d1879ce382e762af}
  133. Calculates the radian value of the given degree value.
  134. \begin{DoxyParams}{Parameters}
  135. {\em degree} & The arc value in degree \\
  136. \hline
  137. \end{DoxyParams}
  138. \begin{DoxyReturn}{Returns}
  139. The arc value in radian
  140. \end{DoxyReturn}
  141. The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
  142. \item
  143. util/My\+Math.\+h\item
  144. util/My\+Math.\+cpp\end{DoxyCompactItemize}