test_vector3.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  1. /*************************************************************************/
  2. /* test_vector3.h */
  3. /*************************************************************************/
  4. /* This file is part of: */
  5. /* GODOT ENGINE */
  6. /* https://godotengine.org */
  7. /*************************************************************************/
  8. /* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
  9. /* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
  10. /* */
  11. /* Permission is hereby granted, free of charge, to any person obtaining */
  12. /* a copy of this software and associated documentation files (the */
  13. /* "Software"), to deal in the Software without restriction, including */
  14. /* without limitation the rights to use, copy, modify, merge, publish, */
  15. /* distribute, sublicense, and/or sell copies of the Software, and to */
  16. /* permit persons to whom the Software is furnished to do so, subject to */
  17. /* the following conditions: */
  18. /* */
  19. /* The above copyright notice and this permission notice shall be */
  20. /* included in all copies or substantial portions of the Software. */
  21. /* */
  22. /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
  23. /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
  24. /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
  25. /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
  26. /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
  27. /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
  28. /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
  29. /*************************************************************************/
  30. #ifndef TEST_VECTOR3_H
  31. #define TEST_VECTOR3_H
  32. #include "core/math/vector3.h"
  33. #include "tests/test_macros.h"
  34. #define Math_SQRT13 0.57735026918962576450914878050196
  35. #define Math_SQRT3 1.7320508075688772935274463415059
  36. namespace TestVector3 {
  37. TEST_CASE("[Vector3] Angle methods") {
  38. const Vector3 vector_x = Vector3(1, 0, 0);
  39. const Vector3 vector_y = Vector3(0, 1, 0);
  40. const Vector3 vector_yz = Vector3(0, 1, 1);
  41. CHECK_MESSAGE(
  42. Math::is_equal_approx(vector_x.angle_to(vector_y), (real_t)Math_TAU / 4),
  43. "Vector3 angle_to should work as expected.");
  44. CHECK_MESSAGE(
  45. Math::is_equal_approx(vector_x.angle_to(vector_yz), (real_t)Math_TAU / 4),
  46. "Vector3 angle_to should work as expected.");
  47. CHECK_MESSAGE(
  48. Math::is_equal_approx(vector_yz.angle_to(vector_x), (real_t)Math_TAU / 4),
  49. "Vector3 angle_to should work as expected.");
  50. CHECK_MESSAGE(
  51. Math::is_equal_approx(vector_y.angle_to(vector_yz), (real_t)Math_TAU / 8),
  52. "Vector3 angle_to should work as expected.");
  53. CHECK_MESSAGE(
  54. Math::is_equal_approx(vector_x.signed_angle_to(vector_y, vector_y), (real_t)Math_TAU / 4),
  55. "Vector3 signed_angle_to edge case should be postiive.");
  56. CHECK_MESSAGE(
  57. Math::is_equal_approx(vector_x.signed_angle_to(vector_yz, vector_y), (real_t)Math_TAU / -4),
  58. "Vector3 signed_angle_to should work as expected.");
  59. CHECK_MESSAGE(
  60. Math::is_equal_approx(vector_yz.signed_angle_to(vector_x, vector_y), (real_t)Math_TAU / 4),
  61. "Vector3 signed_angle_to should work as expected.");
  62. }
  63. TEST_CASE("[Vector3] Axis methods") {
  64. Vector3 vector = Vector3(1.2, 3.4, 5.6);
  65. CHECK_MESSAGE(
  66. vector.max_axis_index() == Vector3::Axis::AXIS_Z,
  67. "Vector3 max_axis_index should work as expected.");
  68. CHECK_MESSAGE(
  69. vector.min_axis_index() == Vector3::Axis::AXIS_X,
  70. "Vector3 min_axis_index should work as expected.");
  71. CHECK_MESSAGE(
  72. vector.get_axis(vector.max_axis_index()) == (real_t)5.6,
  73. "Vector3 get_axis should work as expected.");
  74. CHECK_MESSAGE(
  75. vector[vector.min_axis_index()] == (real_t)1.2,
  76. "Vector3 array operator should work as expected.");
  77. vector.set_axis(Vector3::Axis::AXIS_Y, 4.7);
  78. CHECK_MESSAGE(
  79. vector.get_axis(Vector3::Axis::AXIS_Y) == (real_t)4.7,
  80. "Vector3 set_axis should work as expected.");
  81. vector[Vector3::Axis::AXIS_Y] = 3.7;
  82. CHECK_MESSAGE(
  83. vector[Vector3::Axis::AXIS_Y] == (real_t)3.7,
  84. "Vector3 array operator setter should work as expected.");
  85. }
  86. TEST_CASE("[Vector3] Interpolation methods") {
  87. const Vector3 vector1 = Vector3(1, 2, 3);
  88. const Vector3 vector2 = Vector3(4, 5, 6);
  89. CHECK_MESSAGE(
  90. vector1.lerp(vector2, 0.5) == Vector3(2.5, 3.5, 4.5),
  91. "Vector3 lerp should work as expected.");
  92. CHECK_MESSAGE(
  93. vector1.lerp(vector2, 1.0 / 3.0).is_equal_approx(Vector3(2, 3, 4)),
  94. "Vector3 lerp should work as expected.");
  95. CHECK_MESSAGE(
  96. vector1.normalized().slerp(vector2.normalized(), 0.5).is_equal_approx(Vector3(0.363866806030273438, 0.555698215961456299, 0.747529566287994385)),
  97. "Vector3 slerp should work as expected.");
  98. CHECK_MESSAGE(
  99. vector1.normalized().slerp(vector2.normalized(), 1.0 / 3.0).is_equal_approx(Vector3(0.332119762897491455, 0.549413740634918213, 0.766707837581634521)),
  100. "Vector3 slerp should work as expected.");
  101. CHECK_MESSAGE(
  102. Vector3(5, 0, 0).slerp(Vector3(0, 3, 4), 0.5).is_equal_approx(Vector3(3.535533905029296875, 2.121320486068725586, 2.828427314758300781)),
  103. "Vector3 slerp with non-normalized values should work as expected.");
  104. CHECK_MESSAGE(
  105. Vector3().slerp(Vector3(), 0.5) == Vector3(),
  106. "Vector3 slerp with both inputs as zero vectors should return a zero vector.");
  107. CHECK_MESSAGE(
  108. Vector3().slerp(Vector3(1, 1, 1), 0.5) == Vector3(0.5, 0.5, 0.5),
  109. "Vector3 slerp with one input as zero should behave like a regular lerp.");
  110. CHECK_MESSAGE(
  111. Vector3(1, 1, 1).slerp(Vector3(), 0.5) == Vector3(0.5, 0.5, 0.5),
  112. "Vector3 slerp with one input as zero should behave like a regular lerp.");
  113. CHECK_MESSAGE(
  114. Math::is_equal_approx(vector1.slerp(vector2, 0.5).length(), (real_t)6.25831088708303172),
  115. "Vector3 slerp with different length input should return a vector with an interpolated length.");
  116. CHECK_MESSAGE(
  117. Math::is_equal_approx(vector1.angle_to(vector1.slerp(vector2, 0.5)) * 2, vector1.angle_to(vector2)),
  118. "Vector3 slerp with different length input should return a vector with an interpolated angle.");
  119. CHECK_MESSAGE(
  120. vector1.cubic_interpolate(vector2, Vector3(), Vector3(7, 7, 7), 0.5) == Vector3(2.375, 3.5, 4.625),
  121. "Vector3 cubic_interpolate should work as expected.");
  122. CHECK_MESSAGE(
  123. vector1.cubic_interpolate(vector2, Vector3(), Vector3(7, 7, 7), 1.0 / 3.0).is_equal_approx(Vector3(1.851851940155029297, 2.962963104248046875, 4.074074268341064453)),
  124. "Vector3 cubic_interpolate should work as expected.");
  125. CHECK_MESSAGE(
  126. Vector3(1, 0, 0).move_toward(Vector3(10, 0, 0), 3) == Vector3(4, 0, 0),
  127. "Vector3 move_toward should work as expected.");
  128. }
  129. TEST_CASE("[Vector3] Length methods") {
  130. const Vector3 vector1 = Vector3(10, 10, 10);
  131. const Vector3 vector2 = Vector3(20, 30, 40);
  132. CHECK_MESSAGE(
  133. vector1.length_squared() == 300,
  134. "Vector3 length_squared should work as expected and return exact result.");
  135. CHECK_MESSAGE(
  136. Math::is_equal_approx(vector1.length(), 10 * (real_t)Math_SQRT3),
  137. "Vector3 length should work as expected.");
  138. CHECK_MESSAGE(
  139. vector2.length_squared() == 2900,
  140. "Vector3 length_squared should work as expected and return exact result.");
  141. CHECK_MESSAGE(
  142. Math::is_equal_approx(vector2.length(), (real_t)53.8516480713450403125),
  143. "Vector3 length should work as expected.");
  144. CHECK_MESSAGE(
  145. vector1.distance_squared_to(vector2) == 1400,
  146. "Vector3 distance_squared_to should work as expected and return exact result.");
  147. CHECK_MESSAGE(
  148. Math::is_equal_approx(vector1.distance_to(vector2), (real_t)37.41657386773941385584),
  149. "Vector3 distance_to should work as expected.");
  150. }
  151. TEST_CASE("[Vector3] Limiting methods") {
  152. const Vector3 vector = Vector3(10, 10, 10);
  153. CHECK_MESSAGE(
  154. vector.limit_length().is_equal_approx(Vector3(Math_SQRT13, Math_SQRT13, Math_SQRT13)),
  155. "Vector3 limit_length should work as expected.");
  156. CHECK_MESSAGE(
  157. vector.limit_length(5).is_equal_approx(5 * Vector3(Math_SQRT13, Math_SQRT13, Math_SQRT13)),
  158. "Vector3 limit_length should work as expected.");
  159. CHECK_MESSAGE(
  160. Vector3(-5, 5, 15).clamp(Vector3(), vector) == Vector3(0, 5, 10),
  161. "Vector3 clamp should work as expected.");
  162. CHECK_MESSAGE(
  163. vector.clamp(Vector3(0, 10, 15), Vector3(5, 10, 20)) == Vector3(5, 10, 15),
  164. "Vector3 clamp should work as expected.");
  165. }
  166. TEST_CASE("[Vector3] Normalization methods") {
  167. CHECK_MESSAGE(
  168. Vector3(1, 0, 0).is_normalized() == true,
  169. "Vector3 is_normalized should return true for a normalized vector.");
  170. CHECK_MESSAGE(
  171. Vector3(1, 1, 1).is_normalized() == false,
  172. "Vector3 is_normalized should return false for a non-normalized vector.");
  173. CHECK_MESSAGE(
  174. Vector3(1, 0, 0).normalized() == Vector3(1, 0, 0),
  175. "Vector3 normalized should return the same vector for a normalized vector.");
  176. CHECK_MESSAGE(
  177. Vector3(1, 1, 0).normalized().is_equal_approx(Vector3(Math_SQRT12, Math_SQRT12, 0)),
  178. "Vector3 normalized should work as expected.");
  179. CHECK_MESSAGE(
  180. Vector3(1, 1, 1).normalized().is_equal_approx(Vector3(Math_SQRT13, Math_SQRT13, Math_SQRT13)),
  181. "Vector3 normalized should work as expected.");
  182. }
  183. TEST_CASE("[Vector3] Operators") {
  184. const Vector3 decimal1 = Vector3(2.3, 4.9, 7.8);
  185. const Vector3 decimal2 = Vector3(1.2, 3.4, 5.6);
  186. const Vector3 power1 = Vector3(0.75, 1.5, 0.625);
  187. const Vector3 power2 = Vector3(0.5, 0.125, 0.25);
  188. const Vector3 int1 = Vector3(4, 5, 9);
  189. const Vector3 int2 = Vector3(1, 2, 3);
  190. CHECK_MESSAGE(
  191. (decimal1 + decimal2).is_equal_approx(Vector3(3.5, 8.3, 13.4)),
  192. "Vector3 addition should behave as expected.");
  193. CHECK_MESSAGE(
  194. (power1 + power2) == Vector3(1.25, 1.625, 0.875),
  195. "Vector3 addition with powers of two should give exact results.");
  196. CHECK_MESSAGE(
  197. (int1 + int2) == Vector3(5, 7, 12),
  198. "Vector3 addition with integers should give exact results.");
  199. CHECK_MESSAGE(
  200. (decimal1 - decimal2).is_equal_approx(Vector3(1.1, 1.5, 2.2)),
  201. "Vector3 subtraction should behave as expected.");
  202. CHECK_MESSAGE(
  203. (power1 - power2) == Vector3(0.25, 1.375, 0.375),
  204. "Vector3 subtraction with powers of two should give exact results.");
  205. CHECK_MESSAGE(
  206. (int1 - int2) == Vector3(3, 3, 6),
  207. "Vector3 subtraction with integers should give exact results.");
  208. CHECK_MESSAGE(
  209. (decimal1 * decimal2).is_equal_approx(Vector3(2.76, 16.66, 43.68)),
  210. "Vector3 multiplication should behave as expected.");
  211. CHECK_MESSAGE(
  212. (power1 * power2) == Vector3(0.375, 0.1875, 0.15625),
  213. "Vector3 multiplication with powers of two should give exact results.");
  214. CHECK_MESSAGE(
  215. (int1 * int2) == Vector3(4, 10, 27),
  216. "Vector3 multiplication with integers should give exact results.");
  217. CHECK_MESSAGE(
  218. (decimal1 / decimal2).is_equal_approx(Vector3(1.91666666666666666, 1.44117647058823529, 1.39285714285714286)),
  219. "Vector3 division should behave as expected.");
  220. CHECK_MESSAGE(
  221. (power1 / power2) == Vector3(1.5, 12.0, 2.5),
  222. "Vector3 division with powers of two should give exact results.");
  223. CHECK_MESSAGE(
  224. (int1 / int2) == Vector3(4, 2.5, 3),
  225. "Vector3 division with integers should give exact results.");
  226. CHECK_MESSAGE(
  227. (decimal1 * 2).is_equal_approx(Vector3(4.6, 9.8, 15.6)),
  228. "Vector3 multiplication should behave as expected.");
  229. CHECK_MESSAGE(
  230. (power1 * 2) == Vector3(1.5, 3, 1.25),
  231. "Vector3 multiplication with powers of two should give exact results.");
  232. CHECK_MESSAGE(
  233. (int1 * 2) == Vector3(8, 10, 18),
  234. "Vector3 multiplication with integers should give exact results.");
  235. CHECK_MESSAGE(
  236. (decimal1 / 2).is_equal_approx(Vector3(1.15, 2.45, 3.9)),
  237. "Vector3 division should behave as expected.");
  238. CHECK_MESSAGE(
  239. (power1 / 2) == Vector3(0.375, 0.75, 0.3125),
  240. "Vector3 division with powers of two should give exact results.");
  241. CHECK_MESSAGE(
  242. (int1 / 2) == Vector3(2, 2.5, 4.5),
  243. "Vector3 division with integers should give exact results.");
  244. CHECK_MESSAGE(
  245. ((Vector3i)decimal1) == Vector3i(2, 4, 7),
  246. "Vector3 cast to Vector3i should work as expected.");
  247. CHECK_MESSAGE(
  248. ((Vector3i)decimal2) == Vector3i(1, 3, 5),
  249. "Vector3 cast to Vector3i should work as expected.");
  250. CHECK_MESSAGE(
  251. Vector3(Vector3i(1, 2, 3)) == Vector3(1, 2, 3),
  252. "Vector3 constructed from Vector3i should work as expected.");
  253. CHECK_MESSAGE(
  254. ((String)decimal1) == "(2.3, 4.9, 7.8)",
  255. "Vector3 cast to String should work as expected.");
  256. CHECK_MESSAGE(
  257. ((String)decimal2) == "(1.2, 3.4, 5.6)",
  258. "Vector3 cast to String should work as expected.");
  259. CHECK_MESSAGE(
  260. ((String)Vector3(9.7, 9.8, 9.9)) == "(9.7, 9.8, 9.9)",
  261. "Vector3 cast to String should work as expected.");
  262. #ifdef REAL_T_IS_DOUBLE
  263. CHECK_MESSAGE(
  264. ((String)Vector3(Math_E, Math_SQRT2, Math_SQRT3)) == "(2.71828182845905, 1.4142135623731, 1.73205080756888)",
  265. "Vector3 cast to String should print the correct amount of digits for real_t = double.");
  266. #else
  267. CHECK_MESSAGE(
  268. ((String)Vector3(Math_E, Math_SQRT2, Math_SQRT3)) == "(2.718282, 1.414214, 1.732051)",
  269. "Vector3 cast to String should print the correct amount of digits for real_t = float.");
  270. #endif // REAL_T_IS_DOUBLE
  271. }
  272. TEST_CASE("[Vector3] Other methods") {
  273. const Vector3 vector = Vector3(1.2, 3.4, 5.6);
  274. CHECK_MESSAGE(
  275. vector.direction_to(Vector3()).is_equal_approx(-vector.normalized()),
  276. "Vector3 direction_to should work as expected.");
  277. CHECK_MESSAGE(
  278. Vector3(1, 1, 1).direction_to(Vector3(2, 2, 2)).is_equal_approx(Vector3(Math_SQRT13, Math_SQRT13, Math_SQRT13)),
  279. "Vector3 direction_to should work as expected.");
  280. CHECK_MESSAGE(
  281. vector.inverse().is_equal_approx(Vector3(1 / 1.2, 1 / 3.4, 1 / 5.6)),
  282. "Vector3 inverse should work as expected.");
  283. CHECK_MESSAGE(
  284. vector.posmod(2).is_equal_approx(Vector3(1.2, 1.4, 1.6)),
  285. "Vector3 posmod should work as expected.");
  286. CHECK_MESSAGE(
  287. (-vector).posmod(2).is_equal_approx(Vector3(0.8, 0.6, 0.4)),
  288. "Vector3 posmod should work as expected.");
  289. CHECK_MESSAGE(
  290. vector.posmodv(Vector3(1, 2, 3)).is_equal_approx(Vector3(0.2, 1.4, 2.6)),
  291. "Vector3 posmodv should work as expected.");
  292. CHECK_MESSAGE(
  293. (-vector).posmodv(Vector3(2, 3, 4)).is_equal_approx(Vector3(0.8, 2.6, 2.4)),
  294. "Vector3 posmodv should work as expected.");
  295. CHECK_MESSAGE(
  296. vector.rotated(Vector3(0, 1, 0), Math_TAU / 4).is_equal_approx(Vector3(5.6, 3.4, -1.2)),
  297. "Vector3 rotated should work as expected.");
  298. CHECK_MESSAGE(
  299. vector.snapped(Vector3(1, 1, 1)) == Vector3(1, 3, 6),
  300. "Vector3 snapped to integers should be the same as rounding.");
  301. CHECK_MESSAGE(
  302. vector.snapped(Vector3(0.25, 0.25, 0.25)) == Vector3(1.25, 3.5, 5.5),
  303. "Vector3 snapped to 0.25 should give exact results.");
  304. }
  305. TEST_CASE("[Vector3] Plane methods") {
  306. const Vector3 vector = Vector3(1.2, 3.4, 5.6);
  307. const Vector3 vector_y = Vector3(0, 1, 0);
  308. CHECK_MESSAGE(
  309. vector.bounce(vector_y) == Vector3(1.2, -3.4, 5.6),
  310. "Vector3 bounce on a plane with normal of the Y axis should.");
  311. CHECK_MESSAGE(
  312. vector.reflect(vector_y) == Vector3(-1.2, 3.4, -5.6),
  313. "Vector3 reflect on a plane with normal of the Y axis should.");
  314. CHECK_MESSAGE(
  315. vector.project(vector_y) == Vector3(0, 3.4, 0),
  316. "Vector3 projected on the X axis should only give the Y component.");
  317. CHECK_MESSAGE(
  318. vector.slide(vector_y) == Vector3(1.2, 0, 5.6),
  319. "Vector3 slide on a plane with normal of the Y axis should set the Y to zero.");
  320. }
  321. TEST_CASE("[Vector3] Rounding methods") {
  322. const Vector3 vector1 = Vector3(1.2, 3.4, 5.6);
  323. const Vector3 vector2 = Vector3(1.2, -3.4, -5.6);
  324. CHECK_MESSAGE(
  325. vector1.abs() == vector1,
  326. "Vector3 abs should work as expected.");
  327. CHECK_MESSAGE(
  328. vector2.abs() == vector1,
  329. "Vector3 abs should work as expected.");
  330. CHECK_MESSAGE(
  331. vector1.ceil() == Vector3(2, 4, 6),
  332. "Vector3 ceil should work as expected.");
  333. CHECK_MESSAGE(
  334. vector2.ceil() == Vector3(2, -3, -5),
  335. "Vector3 ceil should work as expected.");
  336. CHECK_MESSAGE(
  337. vector1.floor() == Vector3(1, 3, 5),
  338. "Vector3 floor should work as expected.");
  339. CHECK_MESSAGE(
  340. vector2.floor() == Vector3(1, -4, -6),
  341. "Vector3 floor should work as expected.");
  342. CHECK_MESSAGE(
  343. vector1.round() == Vector3(1, 3, 6),
  344. "Vector3 round should work as expected.");
  345. CHECK_MESSAGE(
  346. vector2.round() == Vector3(1, -3, -6),
  347. "Vector3 round should work as expected.");
  348. CHECK_MESSAGE(
  349. vector1.sign() == Vector3(1, 1, 1),
  350. "Vector3 sign should work as expected.");
  351. CHECK_MESSAGE(
  352. vector2.sign() == Vector3(1, -1, -1),
  353. "Vector3 sign should work as expected.");
  354. }
  355. TEST_CASE("[Vector3] Linear algebra methods") {
  356. const Vector3 vector_x = Vector3(1, 0, 0);
  357. const Vector3 vector_y = Vector3(0, 1, 0);
  358. const Vector3 vector_z = Vector3(0, 0, 1);
  359. CHECK_MESSAGE(
  360. vector_x.cross(vector_y) == vector_z,
  361. "Vector3 cross product of X and Y should give Z.");
  362. CHECK_MESSAGE(
  363. vector_y.cross(vector_x) == -vector_z,
  364. "Vector3 cross product of Y and X should give negative Z.");
  365. CHECK_MESSAGE(
  366. vector_y.cross(vector_z) == vector_x,
  367. "Vector3 cross product of Y and Z should give X.");
  368. CHECK_MESSAGE(
  369. vector_z.cross(vector_x) == vector_y,
  370. "Vector3 cross product of Z and X should give Y.");
  371. CHECK_MESSAGE(
  372. vector_x.dot(vector_y) == 0.0,
  373. "Vector3 dot product of perpendicular vectors should be zero.");
  374. CHECK_MESSAGE(
  375. vector_x.dot(vector_x) == 1.0,
  376. "Vector3 dot product of identical unit vectors should be one.");
  377. CHECK_MESSAGE(
  378. (vector_x * 10).dot(vector_x * 10) == 100.0,
  379. "Vector3 dot product of same direction vectors should behave as expected.");
  380. }
  381. } // namespace TestVector3
  382. #endif // TEST_VECTOR3_H