@fimbul-works/vec 1.0.3 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (560) hide show
  1. package/README.md +208 -85
  2. package/dist/cjs/2d/add-2d.d.ts +8 -0
  3. package/dist/cjs/2d/add-2d.js +11 -0
  4. package/dist/cjs/2d/angle-between-2d.d.ts +8 -0
  5. package/dist/cjs/2d/angle-between-2d.js +11 -0
  6. package/dist/cjs/2d/angle-x-2d.d.ts +7 -0
  7. package/dist/cjs/2d/angle-x-2d.js +10 -0
  8. package/dist/cjs/2d/angle-y-2d.d.ts +7 -0
  9. package/dist/cjs/2d/angle-y-2d.js +10 -0
  10. package/dist/cjs/2d/clamp-2d.d.ts +10 -0
  11. package/dist/cjs/2d/clamp-2d.js +14 -0
  12. package/dist/cjs/2d/clone-2d.d.ts +7 -0
  13. package/dist/cjs/2d/clone-2d.js +10 -0
  14. package/dist/cjs/2d/cross-2d.d.ts +8 -0
  15. package/dist/cjs/2d/cross-2d.js +11 -0
  16. package/dist/cjs/2d/distance-2d.d.ts +8 -0
  17. package/dist/cjs/2d/distance-2d.js +11 -0
  18. package/dist/cjs/2d/distance-chebyshev-2d.d.ts +8 -0
  19. package/dist/cjs/2d/distance-chebyshev-2d.js +15 -0
  20. package/dist/cjs/2d/distance-manhattan-2d.d.ts +8 -0
  21. package/dist/cjs/2d/distance-manhattan-2d.js +11 -0
  22. package/dist/cjs/2d/distance-minkowski-2d.d.ts +9 -0
  23. package/dist/cjs/2d/distance-minkowski-2d.js +12 -0
  24. package/dist/cjs/2d/distance-sq-2d.d.ts +8 -0
  25. package/dist/cjs/2d/distance-sq-2d.js +11 -0
  26. package/dist/cjs/2d/divide-2d.d.ts +8 -0
  27. package/dist/cjs/2d/divide-2d.js +14 -0
  28. package/dist/cjs/2d/dot-2d.d.ts +8 -0
  29. package/dist/cjs/2d/dot-2d.js +11 -0
  30. package/dist/cjs/2d/from-angle-x-2d.d.ts +8 -0
  31. package/dist/cjs/2d/from-angle-x-2d.js +14 -0
  32. package/dist/cjs/2d/from-angle-y-2d.d.ts +8 -0
  33. package/dist/cjs/2d/from-angle-y-2d.js +14 -0
  34. package/dist/cjs/2d/from-object-2d.d.ts +10 -0
  35. package/dist/cjs/2d/from-object-2d.js +10 -0
  36. package/dist/cjs/2d/from-polar-coords-2d.d.ts +8 -0
  37. package/dist/cjs/2d/from-polar-coords-2d.js +11 -0
  38. package/dist/cjs/2d/immutable-2d.d.ts +7 -0
  39. package/dist/cjs/2d/immutable-2d.js +10 -0
  40. package/dist/cjs/2d/index.d.ts +47 -0
  41. package/dist/cjs/2d/index.js +63 -0
  42. package/dist/cjs/2d/is-equal-2d.d.ts +8 -0
  43. package/dist/cjs/2d/is-equal-2d.js +11 -0
  44. package/dist/cjs/2d/is-equal-approx-2d.d.ts +9 -0
  45. package/dist/cjs/2d/is-equal-approx-2d.js +12 -0
  46. package/dist/cjs/2d/is-infinite-2d.d.ts +7 -0
  47. package/dist/cjs/2d/is-infinite-2d.js +13 -0
  48. package/dist/cjs/2d/is-nan-2d.d.ts +7 -0
  49. package/dist/cjs/2d/is-nan-2d.js +10 -0
  50. package/dist/cjs/2d/is-opposite-2d.d.ts +8 -0
  51. package/dist/cjs/2d/is-opposite-2d.js +11 -0
  52. package/dist/cjs/2d/is-zero-2d.d.ts +7 -0
  53. package/dist/cjs/2d/is-zero-2d.js +10 -0
  54. package/dist/cjs/2d/lerp-2d.d.ts +9 -0
  55. package/dist/cjs/2d/lerp-2d.js +15 -0
  56. package/dist/cjs/2d/limit-max-2d.d.ts +9 -0
  57. package/dist/cjs/2d/limit-max-2d.js +13 -0
  58. package/dist/cjs/2d/limit-min-2d.d.ts +9 -0
  59. package/dist/cjs/2d/limit-min-2d.js +13 -0
  60. package/dist/cjs/2d/look-at-2d.d.ts +10 -0
  61. package/dist/cjs/2d/look-at-2d.js +14 -0
  62. package/dist/cjs/2d/magnitude-2d.d.ts +7 -0
  63. package/dist/cjs/2d/magnitude-2d.js +10 -0
  64. package/dist/cjs/2d/magnitude-sq-2d.d.ts +7 -0
  65. package/dist/cjs/2d/magnitude-sq-2d.js +10 -0
  66. package/dist/cjs/2d/multiply-2d.d.ts +8 -0
  67. package/dist/cjs/2d/multiply-2d.js +11 -0
  68. package/dist/cjs/2d/negate-2d.d.ts +7 -0
  69. package/dist/cjs/2d/negate-2d.js +10 -0
  70. package/dist/cjs/2d/normalize-2d.d.ts +8 -0
  71. package/dist/cjs/2d/normalize-2d.js +12 -0
  72. package/dist/cjs/2d/one-2d.d.ts +6 -0
  73. package/dist/cjs/2d/one-2d.js +9 -0
  74. package/dist/cjs/2d/project-2d.d.ts +10 -0
  75. package/dist/cjs/2d/project-2d.js +17 -0
  76. package/dist/cjs/2d/random-2d.d.ts +7 -0
  77. package/dist/cjs/2d/random-2d.js +13 -0
  78. package/dist/cjs/2d/reflect-2d.d.ts +9 -0
  79. package/dist/cjs/2d/reflect-2d.js +16 -0
  80. package/dist/cjs/2d/rotate-2d.d.ts +9 -0
  81. package/dist/cjs/2d/rotate-2d.js +27 -0
  82. package/dist/cjs/2d/set-magnitude-2d.d.ts +9 -0
  83. package/dist/cjs/2d/set-magnitude-2d.js +16 -0
  84. package/dist/cjs/2d/subtract-2d.d.ts +8 -0
  85. package/dist/cjs/2d/subtract-2d.js +11 -0
  86. package/dist/cjs/2d/types.d.ts +4 -0
  87. package/dist/cjs/2d/types.js +2 -0
  88. package/dist/cjs/2d/zero-2d.d.ts +6 -0
  89. package/dist/cjs/2d/zero-2d.js +9 -0
  90. package/dist/cjs/3d/add-3d.d.ts +8 -0
  91. package/dist/cjs/3d/add-3d.js +15 -0
  92. package/dist/cjs/3d/angle-between-3d.d.ts +10 -0
  93. package/dist/cjs/3d/angle-between-3d.js +14 -0
  94. package/dist/cjs/3d/angle-x-3d.d.ts +7 -0
  95. package/dist/cjs/3d/angle-x-3d.js +10 -0
  96. package/dist/cjs/3d/angle-y-3d.d.ts +7 -0
  97. package/dist/cjs/3d/angle-y-3d.js +10 -0
  98. package/dist/cjs/3d/angle-z-3d.d.ts +7 -0
  99. package/dist/cjs/3d/angle-z-3d.js +10 -0
  100. package/dist/cjs/3d/clamp-3d.d.ts +10 -0
  101. package/dist/cjs/3d/clamp-3d.js +18 -0
  102. package/dist/cjs/3d/clone-3d.d.ts +7 -0
  103. package/dist/cjs/3d/clone-3d.js +10 -0
  104. package/dist/cjs/3d/cross-3d.d.ts +8 -0
  105. package/dist/cjs/3d/cross-3d.js +15 -0
  106. package/dist/cjs/3d/distance-3d.d.ts +8 -0
  107. package/dist/cjs/3d/distance-3d.js +11 -0
  108. package/dist/cjs/3d/distance-chebyshev-3d.d.ts +8 -0
  109. package/dist/cjs/3d/distance-chebyshev-3d.js +16 -0
  110. package/dist/cjs/3d/distance-manhattan-3d.d.ts +8 -0
  111. package/dist/cjs/3d/distance-manhattan-3d.js +11 -0
  112. package/dist/cjs/3d/distance-minkowski-3d.d.ts +9 -0
  113. package/dist/cjs/3d/distance-minkowski-3d.js +12 -0
  114. package/dist/cjs/3d/distance-sq-3d.d.ts +8 -0
  115. package/dist/cjs/3d/distance-sq-3d.js +11 -0
  116. package/dist/cjs/3d/divide-3d.d.ts +8 -0
  117. package/dist/cjs/3d/divide-3d.js +15 -0
  118. package/dist/cjs/3d/dot-3d.d.ts +8 -0
  119. package/dist/cjs/3d/dot-3d.js +11 -0
  120. package/dist/cjs/3d/from-cylindrical-coords-3d.d.ts +9 -0
  121. package/dist/cjs/3d/from-cylindrical-coords-3d.js +16 -0
  122. package/dist/cjs/3d/from-object-3d.d.ts +11 -0
  123. package/dist/cjs/3d/from-object-3d.js +10 -0
  124. package/dist/cjs/3d/from-spherical-coords-3d.d.ts +9 -0
  125. package/dist/cjs/3d/from-spherical-coords-3d.js +16 -0
  126. package/dist/cjs/3d/immutable-3d.d.ts +7 -0
  127. package/dist/cjs/3d/immutable-3d.js +10 -0
  128. package/dist/cjs/3d/index.d.ts +49 -0
  129. package/dist/cjs/3d/index.js +65 -0
  130. package/dist/cjs/3d/is-equal-3d.d.ts +8 -0
  131. package/dist/cjs/3d/is-equal-3d.js +11 -0
  132. package/dist/cjs/3d/is-equal-approx-3d.d.ts +9 -0
  133. package/dist/cjs/3d/is-equal-approx-3d.js +14 -0
  134. package/dist/cjs/3d/is-infinite-3d.d.ts +7 -0
  135. package/dist/cjs/3d/is-infinite-3d.js +15 -0
  136. package/dist/cjs/3d/is-nan-3d.d.ts +7 -0
  137. package/dist/cjs/3d/is-nan-3d.js +10 -0
  138. package/dist/cjs/3d/is-opposite-3d.d.ts +8 -0
  139. package/dist/cjs/3d/is-opposite-3d.js +11 -0
  140. package/dist/cjs/3d/is-zero-3d.d.ts +7 -0
  141. package/dist/cjs/3d/is-zero-3d.js +10 -0
  142. package/dist/cjs/3d/lerp-3d.d.ts +9 -0
  143. package/dist/cjs/3d/lerp-3d.js +16 -0
  144. package/dist/cjs/3d/limit-max-3d.d.ts +9 -0
  145. package/dist/cjs/3d/limit-max-3d.js +13 -0
  146. package/dist/cjs/3d/limit-min-3d.d.ts +9 -0
  147. package/dist/cjs/3d/limit-min-3d.js +13 -0
  148. package/dist/cjs/3d/look-at-3d.d.ts +10 -0
  149. package/dist/cjs/3d/look-at-3d.js +14 -0
  150. package/dist/cjs/3d/magnitude-3d.d.ts +7 -0
  151. package/dist/cjs/3d/magnitude-3d.js +10 -0
  152. package/dist/cjs/3d/magnitude-sq-3d.d.ts +7 -0
  153. package/dist/cjs/3d/magnitude-sq-3d.js +10 -0
  154. package/dist/cjs/3d/multiply-3d.d.ts +8 -0
  155. package/dist/cjs/3d/multiply-3d.js +15 -0
  156. package/dist/cjs/3d/negate-3d.d.ts +7 -0
  157. package/dist/cjs/3d/negate-3d.js +10 -0
  158. package/dist/cjs/3d/normalize-3d.d.ts +8 -0
  159. package/dist/cjs/3d/normalize-3d.js +12 -0
  160. package/dist/cjs/3d/one-3d.d.ts +6 -0
  161. package/dist/cjs/3d/one-3d.js +9 -0
  162. package/dist/cjs/3d/project-3d.d.ts +10 -0
  163. package/dist/cjs/3d/project-3d.js +17 -0
  164. package/dist/cjs/3d/random-3d.d.ts +7 -0
  165. package/dist/cjs/3d/random-3d.js +11 -0
  166. package/dist/cjs/3d/reflect-3d.d.ts +9 -0
  167. package/dist/cjs/3d/reflect-3d.js +16 -0
  168. package/dist/cjs/3d/rotate-x-3d.d.ts +9 -0
  169. package/dist/cjs/3d/rotate-x-3d.js +26 -0
  170. package/dist/cjs/3d/rotate-y-3d.d.ts +9 -0
  171. package/dist/cjs/3d/rotate-y-3d.js +26 -0
  172. package/dist/cjs/3d/rotate-z-3d.d.ts +9 -0
  173. package/dist/cjs/3d/rotate-z-3d.js +26 -0
  174. package/dist/cjs/3d/set-magnitude-3d.d.ts +9 -0
  175. package/dist/cjs/3d/set-magnitude-3d.js +13 -0
  176. package/dist/cjs/3d/subtract-3d.d.ts +8 -0
  177. package/dist/cjs/3d/subtract-3d.js +15 -0
  178. package/dist/cjs/3d/types.d.ts +4 -0
  179. package/dist/cjs/3d/types.js +2 -0
  180. package/dist/cjs/3d/zero-3d.d.ts +6 -0
  181. package/dist/cjs/3d/zero-3d.js +9 -0
  182. package/dist/cjs/4d/add-4d.d.ts +8 -0
  183. package/dist/cjs/4d/add-4d.js +16 -0
  184. package/dist/cjs/4d/angle-between-4d.d.ts +10 -0
  185. package/dist/cjs/4d/angle-between-4d.js +15 -0
  186. package/dist/cjs/4d/angle-w-4d.d.ts +7 -0
  187. package/dist/cjs/4d/angle-w-4d.js +10 -0
  188. package/dist/cjs/4d/angle-x-4d.d.ts +7 -0
  189. package/dist/cjs/4d/angle-x-4d.js +10 -0
  190. package/dist/cjs/4d/angle-y-4d.d.ts +7 -0
  191. package/dist/cjs/4d/angle-y-4d.js +10 -0
  192. package/dist/cjs/4d/angle-z-4d.d.ts +7 -0
  193. package/dist/cjs/4d/angle-z-4d.js +10 -0
  194. package/dist/cjs/4d/clamp-4d.d.ts +10 -0
  195. package/dist/cjs/4d/clamp-4d.js +18 -0
  196. package/dist/cjs/4d/clone-4d.d.ts +7 -0
  197. package/dist/cjs/4d/clone-4d.js +10 -0
  198. package/dist/cjs/4d/distance-4d.d.ts +8 -0
  199. package/dist/cjs/4d/distance-4d.js +11 -0
  200. package/dist/cjs/4d/distance-chebyshev-4d.d.ts +8 -0
  201. package/dist/cjs/4d/distance-chebyshev-4d.js +23 -0
  202. package/dist/cjs/4d/distance-manhattan-4d.d.ts +8 -0
  203. package/dist/cjs/4d/distance-manhattan-4d.js +14 -0
  204. package/dist/cjs/4d/distance-minkowski-4d.d.ts +9 -0
  205. package/dist/cjs/4d/distance-minkowski-4d.js +16 -0
  206. package/dist/cjs/4d/distance-sq-4d.d.ts +9 -0
  207. package/dist/cjs/4d/distance-sq-4d.js +12 -0
  208. package/dist/cjs/4d/divide-4d.d.ts +8 -0
  209. package/dist/cjs/4d/divide-4d.js +16 -0
  210. package/dist/cjs/4d/dot-4d.d.ts +8 -0
  211. package/dist/cjs/4d/dot-4d.js +11 -0
  212. package/dist/cjs/4d/from-object-4d.d.ts +12 -0
  213. package/dist/cjs/4d/from-object-4d.js +15 -0
  214. package/dist/cjs/4d/immutable-4d.d.ts +7 -0
  215. package/dist/cjs/4d/immutable-4d.js +10 -0
  216. package/dist/cjs/4d/index.d.ts +44 -0
  217. package/dist/cjs/4d/index.js +60 -0
  218. package/dist/cjs/4d/is-equal-4d.d.ts +8 -0
  219. package/dist/cjs/4d/is-equal-4d.js +11 -0
  220. package/dist/cjs/4d/is-equal-approx-4d.d.ts +9 -0
  221. package/dist/cjs/4d/is-equal-approx-4d.js +15 -0
  222. package/dist/cjs/4d/is-infinite-4d.d.ts +7 -0
  223. package/dist/cjs/4d/is-infinite-4d.js +17 -0
  224. package/dist/cjs/4d/is-nan-4d.d.ts +7 -0
  225. package/dist/cjs/4d/is-nan-4d.js +10 -0
  226. package/dist/cjs/4d/is-opposite-4d.d.ts +8 -0
  227. package/dist/cjs/4d/is-opposite-4d.js +11 -0
  228. package/dist/cjs/4d/is-zero-4d.d.ts +7 -0
  229. package/dist/cjs/4d/is-zero-4d.js +10 -0
  230. package/dist/cjs/4d/lerp-4d.d.ts +9 -0
  231. package/dist/cjs/4d/lerp-4d.js +17 -0
  232. package/dist/cjs/4d/limit-max-4d.d.ts +9 -0
  233. package/dist/cjs/4d/limit-max-4d.js +13 -0
  234. package/dist/cjs/4d/limit-min-4d.d.ts +9 -0
  235. package/dist/cjs/4d/limit-min-4d.js +13 -0
  236. package/dist/cjs/4d/look-at-4d.d.ts +10 -0
  237. package/dist/cjs/4d/look-at-4d.js +14 -0
  238. package/dist/cjs/4d/magnitude-4d.d.ts +7 -0
  239. package/dist/cjs/4d/magnitude-4d.js +10 -0
  240. package/dist/cjs/4d/magnitude-sq-4d.d.ts +8 -0
  241. package/dist/cjs/4d/magnitude-sq-4d.js +11 -0
  242. package/dist/cjs/4d/multiply-4d.d.ts +8 -0
  243. package/dist/cjs/4d/multiply-4d.js +16 -0
  244. package/dist/cjs/4d/negate-4d.d.ts +7 -0
  245. package/dist/cjs/4d/negate-4d.js +10 -0
  246. package/dist/cjs/4d/normalize-4d.d.ts +8 -0
  247. package/dist/cjs/4d/normalize-4d.js +17 -0
  248. package/dist/cjs/4d/one-4d.d.ts +6 -0
  249. package/dist/cjs/4d/one-4d.js +9 -0
  250. package/dist/cjs/4d/project-4d.d.ts +10 -0
  251. package/dist/cjs/4d/project-4d.js +18 -0
  252. package/dist/cjs/4d/random-4d.d.ts +7 -0
  253. package/dist/cjs/4d/random-4d.js +21 -0
  254. package/dist/cjs/4d/reflect-4d.d.ts +9 -0
  255. package/dist/cjs/4d/reflect-4d.js +21 -0
  256. package/dist/cjs/4d/set-magnitude-4d.d.ts +9 -0
  257. package/dist/cjs/4d/set-magnitude-4d.js +18 -0
  258. package/dist/cjs/4d/subtract-4d.d.ts +8 -0
  259. package/dist/cjs/4d/subtract-4d.js +16 -0
  260. package/dist/cjs/4d/types.d.ts +4 -0
  261. package/dist/cjs/4d/types.js +2 -0
  262. package/dist/cjs/4d/zero-4d.d.ts +6 -0
  263. package/dist/cjs/4d/zero-4d.js +9 -0
  264. package/dist/cjs/index.d.ts +7 -0
  265. package/dist/cjs/index.js +23 -0
  266. package/dist/cjs/package.json +1 -0
  267. package/dist/cjs/slerp.d.ts +21 -0
  268. package/dist/cjs/slerp.js +28 -0
  269. package/dist/{vec2.d.ts → cjs/vec2.d.ts} +10 -4
  270. package/dist/cjs/vec2.js +889 -0
  271. package/dist/{vec3.d.ts → cjs/vec3.d.ts} +159 -100
  272. package/dist/cjs/vec3.js +1045 -0
  273. package/dist/cjs/vec4.d.ts +602 -0
  274. package/dist/cjs/vec4.js +1101 -0
  275. package/dist/esm/2d/add-2d.d.ts +8 -0
  276. package/dist/esm/2d/add-2d.js +7 -0
  277. package/dist/esm/2d/angle-between-2d.d.ts +8 -0
  278. package/dist/esm/2d/angle-between-2d.js +7 -0
  279. package/dist/esm/2d/angle-x-2d.d.ts +7 -0
  280. package/dist/esm/2d/angle-x-2d.js +6 -0
  281. package/dist/esm/2d/angle-y-2d.d.ts +7 -0
  282. package/dist/esm/2d/angle-y-2d.js +6 -0
  283. package/dist/esm/2d/clamp-2d.d.ts +10 -0
  284. package/dist/esm/2d/clamp-2d.js +10 -0
  285. package/dist/esm/2d/clone-2d.d.ts +7 -0
  286. package/dist/esm/2d/clone-2d.js +6 -0
  287. package/dist/esm/2d/cross-2d.d.ts +8 -0
  288. package/dist/esm/2d/cross-2d.js +7 -0
  289. package/dist/esm/2d/distance-2d.d.ts +8 -0
  290. package/dist/esm/2d/distance-2d.js +7 -0
  291. package/dist/esm/2d/distance-chebyshev-2d.d.ts +8 -0
  292. package/dist/esm/2d/distance-chebyshev-2d.js +11 -0
  293. package/dist/esm/2d/distance-manhattan-2d.d.ts +8 -0
  294. package/dist/esm/2d/distance-manhattan-2d.js +7 -0
  295. package/dist/esm/2d/distance-minkowski-2d.d.ts +9 -0
  296. package/dist/esm/2d/distance-minkowski-2d.js +8 -0
  297. package/dist/esm/2d/distance-sq-2d.d.ts +8 -0
  298. package/dist/esm/2d/distance-sq-2d.js +7 -0
  299. package/dist/esm/2d/divide-2d.d.ts +8 -0
  300. package/dist/esm/2d/divide-2d.js +10 -0
  301. package/dist/esm/2d/dot-2d.d.ts +8 -0
  302. package/dist/esm/2d/dot-2d.js +7 -0
  303. package/dist/esm/2d/from-angle-x-2d.d.ts +8 -0
  304. package/dist/esm/2d/from-angle-x-2d.js +10 -0
  305. package/dist/esm/2d/from-angle-y-2d.d.ts +8 -0
  306. package/dist/esm/2d/from-angle-y-2d.js +10 -0
  307. package/dist/esm/2d/from-object-2d.d.ts +10 -0
  308. package/dist/esm/2d/from-object-2d.js +6 -0
  309. package/dist/esm/2d/from-polar-coords-2d.d.ts +8 -0
  310. package/dist/esm/2d/from-polar-coords-2d.js +7 -0
  311. package/dist/esm/2d/immutable-2d.d.ts +7 -0
  312. package/dist/esm/2d/immutable-2d.js +6 -0
  313. package/dist/esm/2d/index.d.ts +47 -0
  314. package/dist/esm/2d/index.js +47 -0
  315. package/dist/esm/2d/is-equal-2d.d.ts +8 -0
  316. package/dist/esm/2d/is-equal-2d.js +7 -0
  317. package/dist/esm/2d/is-equal-approx-2d.d.ts +9 -0
  318. package/dist/esm/2d/is-equal-approx-2d.js +8 -0
  319. package/dist/esm/2d/is-infinite-2d.d.ts +7 -0
  320. package/dist/esm/2d/is-infinite-2d.js +9 -0
  321. package/dist/esm/2d/is-nan-2d.d.ts +7 -0
  322. package/dist/esm/2d/is-nan-2d.js +6 -0
  323. package/dist/esm/2d/is-opposite-2d.d.ts +8 -0
  324. package/dist/esm/2d/is-opposite-2d.js +7 -0
  325. package/dist/esm/2d/is-zero-2d.d.ts +7 -0
  326. package/dist/esm/2d/is-zero-2d.js +6 -0
  327. package/dist/esm/2d/lerp-2d.d.ts +9 -0
  328. package/dist/esm/2d/lerp-2d.js +11 -0
  329. package/dist/esm/2d/limit-max-2d.d.ts +9 -0
  330. package/dist/esm/2d/limit-max-2d.js +9 -0
  331. package/dist/esm/2d/limit-min-2d.d.ts +9 -0
  332. package/dist/esm/2d/limit-min-2d.js +9 -0
  333. package/dist/esm/2d/look-at-2d.d.ts +10 -0
  334. package/dist/esm/2d/look-at-2d.js +10 -0
  335. package/dist/esm/2d/magnitude-2d.d.ts +7 -0
  336. package/dist/esm/2d/magnitude-2d.js +6 -0
  337. package/dist/esm/2d/magnitude-sq-2d.d.ts +7 -0
  338. package/dist/esm/2d/magnitude-sq-2d.js +6 -0
  339. package/dist/esm/2d/multiply-2d.d.ts +8 -0
  340. package/dist/esm/2d/multiply-2d.js +7 -0
  341. package/dist/esm/2d/negate-2d.d.ts +7 -0
  342. package/dist/esm/2d/negate-2d.js +6 -0
  343. package/dist/esm/2d/normalize-2d.d.ts +8 -0
  344. package/dist/esm/2d/normalize-2d.js +8 -0
  345. package/dist/esm/2d/one-2d.d.ts +6 -0
  346. package/dist/esm/2d/one-2d.js +5 -0
  347. package/dist/esm/2d/project-2d.d.ts +10 -0
  348. package/dist/esm/2d/project-2d.js +13 -0
  349. package/dist/esm/2d/random-2d.d.ts +7 -0
  350. package/dist/esm/2d/random-2d.js +9 -0
  351. package/dist/esm/2d/reflect-2d.d.ts +9 -0
  352. package/dist/esm/2d/reflect-2d.js +12 -0
  353. package/dist/esm/2d/rotate-2d.d.ts +9 -0
  354. package/dist/esm/2d/rotate-2d.js +23 -0
  355. package/dist/esm/2d/set-magnitude-2d.d.ts +9 -0
  356. package/dist/esm/2d/set-magnitude-2d.js +12 -0
  357. package/dist/esm/2d/subtract-2d.d.ts +8 -0
  358. package/dist/esm/2d/subtract-2d.js +7 -0
  359. package/dist/esm/2d/types.d.ts +4 -0
  360. package/dist/esm/2d/types.js +1 -0
  361. package/dist/esm/2d/zero-2d.d.ts +6 -0
  362. package/dist/esm/2d/zero-2d.js +5 -0
  363. package/dist/esm/3d/add-3d.d.ts +8 -0
  364. package/dist/esm/3d/add-3d.js +11 -0
  365. package/dist/esm/3d/angle-between-3d.d.ts +10 -0
  366. package/dist/esm/3d/angle-between-3d.js +10 -0
  367. package/dist/esm/3d/angle-x-3d.d.ts +7 -0
  368. package/dist/esm/3d/angle-x-3d.js +6 -0
  369. package/dist/esm/3d/angle-y-3d.d.ts +7 -0
  370. package/dist/esm/3d/angle-y-3d.js +6 -0
  371. package/dist/esm/3d/angle-z-3d.d.ts +7 -0
  372. package/dist/esm/3d/angle-z-3d.js +6 -0
  373. package/dist/esm/3d/clamp-3d.d.ts +10 -0
  374. package/dist/esm/3d/clamp-3d.js +14 -0
  375. package/dist/esm/3d/clone-3d.d.ts +7 -0
  376. package/dist/esm/3d/clone-3d.js +6 -0
  377. package/dist/esm/3d/cross-3d.d.ts +8 -0
  378. package/dist/esm/3d/cross-3d.js +11 -0
  379. package/dist/esm/3d/distance-3d.d.ts +8 -0
  380. package/dist/esm/3d/distance-3d.js +7 -0
  381. package/dist/esm/3d/distance-chebyshev-3d.d.ts +8 -0
  382. package/dist/esm/3d/distance-chebyshev-3d.js +12 -0
  383. package/dist/esm/3d/distance-manhattan-3d.d.ts +8 -0
  384. package/dist/esm/3d/distance-manhattan-3d.js +7 -0
  385. package/dist/esm/3d/distance-minkowski-3d.d.ts +9 -0
  386. package/dist/esm/3d/distance-minkowski-3d.js +8 -0
  387. package/dist/esm/3d/distance-sq-3d.d.ts +8 -0
  388. package/dist/esm/3d/distance-sq-3d.js +7 -0
  389. package/dist/esm/3d/divide-3d.d.ts +8 -0
  390. package/dist/esm/3d/divide-3d.js +11 -0
  391. package/dist/esm/3d/dot-3d.d.ts +8 -0
  392. package/dist/esm/3d/dot-3d.js +7 -0
  393. package/dist/esm/3d/from-cylindrical-coords-3d.d.ts +9 -0
  394. package/dist/esm/3d/from-cylindrical-coords-3d.js +12 -0
  395. package/dist/esm/3d/from-object-3d.d.ts +11 -0
  396. package/dist/esm/3d/from-object-3d.js +6 -0
  397. package/dist/esm/3d/from-spherical-coords-3d.d.ts +9 -0
  398. package/dist/esm/3d/from-spherical-coords-3d.js +12 -0
  399. package/dist/esm/3d/immutable-3d.d.ts +7 -0
  400. package/dist/esm/3d/immutable-3d.js +6 -0
  401. package/dist/esm/3d/index.d.ts +49 -0
  402. package/dist/esm/3d/index.js +49 -0
  403. package/dist/esm/3d/is-equal-3d.d.ts +8 -0
  404. package/dist/esm/3d/is-equal-3d.js +7 -0
  405. package/dist/esm/3d/is-equal-approx-3d.d.ts +9 -0
  406. package/dist/esm/3d/is-equal-approx-3d.js +10 -0
  407. package/dist/esm/3d/is-infinite-3d.d.ts +7 -0
  408. package/dist/esm/3d/is-infinite-3d.js +11 -0
  409. package/dist/esm/3d/is-nan-3d.d.ts +7 -0
  410. package/dist/esm/3d/is-nan-3d.js +6 -0
  411. package/dist/esm/3d/is-opposite-3d.d.ts +8 -0
  412. package/dist/esm/3d/is-opposite-3d.js +7 -0
  413. package/dist/esm/3d/is-zero-3d.d.ts +7 -0
  414. package/dist/esm/3d/is-zero-3d.js +6 -0
  415. package/dist/esm/3d/lerp-3d.d.ts +9 -0
  416. package/dist/esm/3d/lerp-3d.js +12 -0
  417. package/dist/esm/3d/limit-max-3d.d.ts +9 -0
  418. package/dist/esm/3d/limit-max-3d.js +9 -0
  419. package/dist/esm/3d/limit-min-3d.d.ts +9 -0
  420. package/dist/esm/3d/limit-min-3d.js +9 -0
  421. package/dist/esm/3d/look-at-3d.d.ts +10 -0
  422. package/dist/esm/3d/look-at-3d.js +10 -0
  423. package/dist/esm/3d/magnitude-3d.d.ts +7 -0
  424. package/dist/esm/3d/magnitude-3d.js +6 -0
  425. package/dist/esm/3d/magnitude-sq-3d.d.ts +7 -0
  426. package/dist/esm/3d/magnitude-sq-3d.js +6 -0
  427. package/dist/esm/3d/multiply-3d.d.ts +8 -0
  428. package/dist/esm/3d/multiply-3d.js +11 -0
  429. package/dist/esm/3d/negate-3d.d.ts +7 -0
  430. package/dist/esm/3d/negate-3d.js +6 -0
  431. package/dist/esm/3d/normalize-3d.d.ts +8 -0
  432. package/dist/esm/3d/normalize-3d.js +8 -0
  433. package/dist/esm/3d/one-3d.d.ts +6 -0
  434. package/dist/esm/3d/one-3d.js +5 -0
  435. package/dist/esm/3d/project-3d.d.ts +10 -0
  436. package/dist/esm/3d/project-3d.js +13 -0
  437. package/dist/esm/3d/random-3d.d.ts +7 -0
  438. package/dist/esm/3d/random-3d.js +7 -0
  439. package/dist/esm/3d/reflect-3d.d.ts +9 -0
  440. package/dist/esm/3d/reflect-3d.js +12 -0
  441. package/dist/esm/3d/rotate-x-3d.d.ts +9 -0
  442. package/dist/esm/3d/rotate-x-3d.js +22 -0
  443. package/dist/esm/3d/rotate-y-3d.d.ts +9 -0
  444. package/dist/esm/3d/rotate-y-3d.js +22 -0
  445. package/dist/esm/3d/rotate-z-3d.d.ts +9 -0
  446. package/dist/esm/3d/rotate-z-3d.js +22 -0
  447. package/dist/esm/3d/set-magnitude-3d.d.ts +9 -0
  448. package/dist/esm/3d/set-magnitude-3d.js +9 -0
  449. package/dist/esm/3d/subtract-3d.d.ts +8 -0
  450. package/dist/esm/3d/subtract-3d.js +11 -0
  451. package/dist/esm/3d/types.d.ts +4 -0
  452. package/dist/esm/3d/types.js +1 -0
  453. package/dist/esm/3d/zero-3d.d.ts +6 -0
  454. package/dist/esm/3d/zero-3d.js +5 -0
  455. package/dist/esm/4d/add-4d.d.ts +8 -0
  456. package/dist/esm/4d/add-4d.js +12 -0
  457. package/dist/esm/4d/angle-between-4d.d.ts +10 -0
  458. package/dist/esm/4d/angle-between-4d.js +11 -0
  459. package/dist/esm/4d/angle-w-4d.d.ts +7 -0
  460. package/dist/esm/4d/angle-w-4d.js +6 -0
  461. package/dist/esm/4d/angle-x-4d.d.ts +7 -0
  462. package/dist/esm/4d/angle-x-4d.js +6 -0
  463. package/dist/esm/4d/angle-y-4d.d.ts +7 -0
  464. package/dist/esm/4d/angle-y-4d.js +6 -0
  465. package/dist/esm/4d/angle-z-4d.d.ts +7 -0
  466. package/dist/esm/4d/angle-z-4d.js +6 -0
  467. package/dist/esm/4d/clamp-4d.d.ts +10 -0
  468. package/dist/esm/4d/clamp-4d.js +14 -0
  469. package/dist/esm/4d/clone-4d.d.ts +7 -0
  470. package/dist/esm/4d/clone-4d.js +6 -0
  471. package/dist/esm/4d/distance-4d.d.ts +8 -0
  472. package/dist/esm/4d/distance-4d.js +7 -0
  473. package/dist/esm/4d/distance-chebyshev-4d.d.ts +8 -0
  474. package/dist/esm/4d/distance-chebyshev-4d.js +19 -0
  475. package/dist/esm/4d/distance-manhattan-4d.d.ts +8 -0
  476. package/dist/esm/4d/distance-manhattan-4d.js +10 -0
  477. package/dist/esm/4d/distance-minkowski-4d.d.ts +9 -0
  478. package/dist/esm/4d/distance-minkowski-4d.js +12 -0
  479. package/dist/esm/4d/distance-sq-4d.d.ts +9 -0
  480. package/dist/esm/4d/distance-sq-4d.js +8 -0
  481. package/dist/esm/4d/divide-4d.d.ts +8 -0
  482. package/dist/esm/4d/divide-4d.js +12 -0
  483. package/dist/esm/4d/dot-4d.d.ts +8 -0
  484. package/dist/esm/4d/dot-4d.js +7 -0
  485. package/dist/esm/4d/from-object-4d.d.ts +12 -0
  486. package/dist/esm/4d/from-object-4d.js +11 -0
  487. package/dist/esm/4d/immutable-4d.d.ts +7 -0
  488. package/dist/esm/4d/immutable-4d.js +6 -0
  489. package/dist/esm/4d/index.d.ts +44 -0
  490. package/dist/esm/4d/index.js +44 -0
  491. package/dist/esm/4d/is-equal-4d.d.ts +8 -0
  492. package/dist/esm/4d/is-equal-4d.js +7 -0
  493. package/dist/esm/4d/is-equal-approx-4d.d.ts +9 -0
  494. package/dist/esm/4d/is-equal-approx-4d.js +11 -0
  495. package/dist/esm/4d/is-infinite-4d.d.ts +7 -0
  496. package/dist/esm/4d/is-infinite-4d.js +13 -0
  497. package/dist/esm/4d/is-nan-4d.d.ts +7 -0
  498. package/dist/esm/4d/is-nan-4d.js +6 -0
  499. package/dist/esm/4d/is-opposite-4d.d.ts +8 -0
  500. package/dist/esm/4d/is-opposite-4d.js +7 -0
  501. package/dist/esm/4d/is-zero-4d.d.ts +7 -0
  502. package/dist/esm/4d/is-zero-4d.js +6 -0
  503. package/dist/esm/4d/lerp-4d.d.ts +9 -0
  504. package/dist/esm/4d/lerp-4d.js +13 -0
  505. package/dist/esm/4d/limit-max-4d.d.ts +9 -0
  506. package/dist/esm/4d/limit-max-4d.js +9 -0
  507. package/dist/esm/4d/limit-min-4d.d.ts +9 -0
  508. package/dist/esm/4d/limit-min-4d.js +9 -0
  509. package/dist/esm/4d/look-at-4d.d.ts +10 -0
  510. package/dist/esm/4d/look-at-4d.js +10 -0
  511. package/dist/esm/4d/magnitude-4d.d.ts +7 -0
  512. package/dist/esm/4d/magnitude-4d.js +6 -0
  513. package/dist/esm/4d/magnitude-sq-4d.d.ts +8 -0
  514. package/dist/esm/4d/magnitude-sq-4d.js +7 -0
  515. package/dist/esm/4d/multiply-4d.d.ts +8 -0
  516. package/dist/esm/4d/multiply-4d.js +12 -0
  517. package/dist/esm/4d/negate-4d.d.ts +7 -0
  518. package/dist/esm/4d/negate-4d.js +6 -0
  519. package/dist/esm/4d/normalize-4d.d.ts +8 -0
  520. package/dist/esm/4d/normalize-4d.js +13 -0
  521. package/dist/esm/4d/one-4d.d.ts +6 -0
  522. package/dist/esm/4d/one-4d.js +5 -0
  523. package/dist/esm/4d/project-4d.d.ts +10 -0
  524. package/dist/esm/4d/project-4d.js +14 -0
  525. package/dist/esm/4d/random-4d.d.ts +7 -0
  526. package/dist/esm/4d/random-4d.js +17 -0
  527. package/dist/esm/4d/reflect-4d.d.ts +9 -0
  528. package/dist/esm/4d/reflect-4d.js +17 -0
  529. package/dist/esm/4d/set-magnitude-4d.d.ts +9 -0
  530. package/dist/esm/4d/set-magnitude-4d.js +14 -0
  531. package/dist/esm/4d/subtract-4d.d.ts +8 -0
  532. package/dist/esm/4d/subtract-4d.js +12 -0
  533. package/dist/esm/4d/types.d.ts +4 -0
  534. package/dist/esm/4d/types.js +1 -0
  535. package/dist/esm/4d/zero-4d.d.ts +6 -0
  536. package/dist/esm/4d/zero-4d.js +5 -0
  537. package/dist/esm/index.d.ts +7 -0
  538. package/dist/esm/index.js +7 -0
  539. package/dist/esm/slerp.d.ts +21 -0
  540. package/dist/esm/slerp.js +23 -0
  541. package/dist/{vec4.d.ts → esm/vec2.d.ts} +165 -157
  542. package/dist/{vec2.js → esm/vec2.js} +14 -6
  543. package/dist/esm/vec3.d.ts +614 -0
  544. package/dist/{vec3.js → esm/vec3.js} +190 -123
  545. package/dist/esm/vec4.d.ts +602 -0
  546. package/dist/{vec4.js → esm/vec4.js} +211 -130
  547. package/docs/ArrayVector2D.md +1090 -0
  548. package/docs/ArrayVector3D.md +1162 -0
  549. package/docs/ArrayVector4D.md +1019 -0
  550. package/docs/README.md +13 -0
  551. package/docs/Slerp.md +64 -0
  552. package/docs/Vec2.md +1827 -0
  553. package/docs/Vec3.md +2084 -0
  554. package/docs/Vec4.md +2031 -0
  555. package/package.json +95 -70
  556. package/VEC2.md +0 -147
  557. package/VEC3.md +0 -159
  558. package/VEC4.md +0 -146
  559. package/dist/index.d.ts +0 -3
  560. package/dist/index.js +0 -3
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Calculates the dot product of two 3D vectors.
3
+ * @param {ArrayVector3D} xyz1 - First vector as `[x, y, z]`
4
+ * @param {ArrayVector3D} xyz2 - Second vector as `[x, y, z]`
5
+ * @returns {number} Dot product
6
+ */
7
+ export const dot3D = (xyz1, xyz2) => xyz1[0] * xyz2[0] + xyz1[1] * xyz2[1] + xyz1[2] * xyz2[2];
@@ -0,0 +1,9 @@
1
+ import type { ArrayVector3D } from "./types";
2
+ /**
3
+ * Creates a vector from cylindrical coordinates.
4
+ * @param {number} r - Radius
5
+ * @param {number} phi - Angle in radians
6
+ * @param {number} z - Vector z axis
7
+ * @returns {ArrayVector3D} Vector
8
+ */
9
+ export declare const fromCylindricalCoords: (r: number, phi: number, z: number) => ArrayVector3D;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Creates a vector from cylindrical coordinates.
3
+ * @param {number} r - Radius
4
+ * @param {number} phi - Angle in radians
5
+ * @param {number} z - Vector z axis
6
+ * @returns {ArrayVector3D} Vector
7
+ */
8
+ export const fromCylindricalCoords = (r, phi, z) => [
9
+ r * Math.cos(phi),
10
+ r * Math.sin(phi),
11
+ z,
12
+ ];
@@ -0,0 +1,11 @@
1
+ import type { ArrayVector3D } from "./types.js";
2
+ /**
3
+ * Creates an ArrayVector3D from an object with x, y and z properties.
4
+ * @param {{ x: number; y: number; z: number }} vector3D - Object with x, y and z properties
5
+ * @returns {ArrayVector3D} Vector
6
+ */
7
+ export declare const fromObject3D: ({ x, y, z }: {
8
+ x: number;
9
+ y: number;
10
+ z: number;
11
+ }) => ArrayVector3D;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Creates an ArrayVector3D from an object with x, y and z properties.
3
+ * @param {{ x: number; y: number; z: number }} vector3D - Object with x, y and z properties
4
+ * @returns {ArrayVector3D} Vector
5
+ */
6
+ export const fromObject3D = ({ x, y, z }) => [x, y, z];
@@ -0,0 +1,9 @@
1
+ import type { ArrayVector3D } from "./types";
2
+ /**
3
+ * Creates a 3D vector from spherical coordinates.
4
+ * @param {number} theta - First angle
5
+ * @param {number} phi - Second angle
6
+ * @param {number} [m] - Optional magnitude (default: `1`)
7
+ * @returns {ArrayVector3D} Vector
8
+ */
9
+ export declare const fromSphericalCoords3D: (theta: number, phi: number, m?: number) => ArrayVector3D;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Creates a 3D vector from spherical coordinates.
3
+ * @param {number} theta - First angle
4
+ * @param {number} phi - Second angle
5
+ * @param {number} [m] - Optional magnitude (default: `1`)
6
+ * @returns {ArrayVector3D} Vector
7
+ */
8
+ export const fromSphericalCoords3D = (theta, phi, m = 1) => [
9
+ m * Math.sin(theta) * Math.cos(phi),
10
+ m * Math.sin(theta) * Math.sin(phi),
11
+ m * Math.cos(theta),
12
+ ];
@@ -0,0 +1,7 @@
1
+ import type { ArrayVector3D } from "./types.js";
2
+ /**
3
+ * Create an immutable 3D vector.
4
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
5
+ * @returns {Readonly<ArrayVector3D>} The immutable vector
6
+ */
7
+ export declare const immutable3D: (xyz: ArrayVector3D) => Readonly<ArrayVector3D>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Create an immutable 3D vector.
3
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
4
+ * @returns {Readonly<ArrayVector3D>} The immutable vector
5
+ */
6
+ export const immutable3D = (xyz) => Object.freeze([xyz[0], xyz[1], xyz[2]]);
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Documentation for functional 3D Vector array operations.
3
+ * @module ArrayVector3D
4
+ */
5
+ export * from "./add-3d.js";
6
+ export * from "./angle-between-3d.js";
7
+ export * from "./angle-x-3d.js";
8
+ export * from "./angle-y-3d.js";
9
+ export * from "./angle-z-3d.js";
10
+ export * from "./clamp-3d.js";
11
+ export * from "./clone-3d.js";
12
+ export * from "./cross-3d.js";
13
+ export * from "./distance-3d.js";
14
+ export * from "./distance-chebyshev-3d.js";
15
+ export * from "./distance-manhattan-3d.js";
16
+ export * from "./distance-minkowski-3d.js";
17
+ export * from "./distance-sq-3d.js";
18
+ export * from "./divide-3d.js";
19
+ export * from "./dot-3d.js";
20
+ export * from "./from-cylindrical-coords-3d.js";
21
+ export * from "./from-object-3d.js";
22
+ export * from "./from-spherical-coords-3d.js";
23
+ export * from "./immutable-3d.js";
24
+ export * from "./is-equal-3d.js";
25
+ export * from "./is-equal-approx-3d.js";
26
+ export * from "./is-infinite-3d.js";
27
+ export * from "./is-nan-3d.js";
28
+ export * from "./is-opposite-3d.js";
29
+ export * from "./is-zero-3d.js";
30
+ export * from "./lerp-3d.js";
31
+ export * from "./limit-max-3d.js";
32
+ export * from "./limit-min-3d.js";
33
+ export * from "./look-at-3d.js";
34
+ export * from "./magnitude-3d.js";
35
+ export * from "./magnitude-sq-3d.js";
36
+ export * from "./multiply-3d.js";
37
+ export * from "./negate-3d.js";
38
+ export * from "./normalize-3d.js";
39
+ export * from "./one-3d.js";
40
+ export * from "./project-3d.js";
41
+ export * from "./random-3d.js";
42
+ export * from "./reflect-3d.js";
43
+ export * from "./rotate-x-3d.js";
44
+ export * from "./rotate-y-3d.js";
45
+ export * from "./rotate-z-3d.js";
46
+ export * from "./set-magnitude-3d.js";
47
+ export * from "./subtract-3d.js";
48
+ export * from "./types.js";
49
+ export * from "./zero-3d.js";
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Documentation for functional 3D Vector array operations.
3
+ * @module ArrayVector3D
4
+ */
5
+ export * from "./add-3d.js";
6
+ export * from "./angle-between-3d.js";
7
+ export * from "./angle-x-3d.js";
8
+ export * from "./angle-y-3d.js";
9
+ export * from "./angle-z-3d.js";
10
+ export * from "./clamp-3d.js";
11
+ export * from "./clone-3d.js";
12
+ export * from "./cross-3d.js";
13
+ export * from "./distance-3d.js";
14
+ export * from "./distance-chebyshev-3d.js";
15
+ export * from "./distance-manhattan-3d.js";
16
+ export * from "./distance-minkowski-3d.js";
17
+ export * from "./distance-sq-3d.js";
18
+ export * from "./divide-3d.js";
19
+ export * from "./dot-3d.js";
20
+ export * from "./from-cylindrical-coords-3d.js";
21
+ export * from "./from-object-3d.js";
22
+ export * from "./from-spherical-coords-3d.js";
23
+ export * from "./immutable-3d.js";
24
+ export * from "./is-equal-3d.js";
25
+ export * from "./is-equal-approx-3d.js";
26
+ export * from "./is-infinite-3d.js";
27
+ export * from "./is-nan-3d.js";
28
+ export * from "./is-opposite-3d.js";
29
+ export * from "./is-zero-3d.js";
30
+ export * from "./lerp-3d.js";
31
+ export * from "./limit-max-3d.js";
32
+ export * from "./limit-min-3d.js";
33
+ export * from "./look-at-3d.js";
34
+ export * from "./magnitude-3d.js";
35
+ export * from "./magnitude-sq-3d.js";
36
+ export * from "./multiply-3d.js";
37
+ export * from "./negate-3d.js";
38
+ export * from "./normalize-3d.js";
39
+ export * from "./one-3d.js";
40
+ export * from "./project-3d.js";
41
+ export * from "./random-3d.js";
42
+ export * from "./reflect-3d.js";
43
+ export * from "./rotate-x-3d.js";
44
+ export * from "./rotate-y-3d.js";
45
+ export * from "./rotate-z-3d.js";
46
+ export * from "./set-magnitude-3d.js";
47
+ export * from "./subtract-3d.js";
48
+ export * from "./types.js";
49
+ export * from "./zero-3d.js";
@@ -0,0 +1,8 @@
1
+ import type { ArrayVector3D } from "./types";
2
+ /**
3
+ * Checks if two 3D vectors are equal.
4
+ * @param {ArrayVector3D} xyz1 - First vector as `[x, y, z]`
5
+ * @param {ArrayVector3D} xyz2 - Second vector as `[x, y, z]`
6
+ * @returns {ArrayVector3D} `true` if the vectors are equal, `false` otherwise
7
+ */
8
+ export declare const isEqual3D: (xyz1: ArrayVector3D, xyz2: ArrayVector3D) => boolean;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Checks if two 3D vectors are equal.
3
+ * @param {ArrayVector3D} xyz1 - First vector as `[x, y, z]`
4
+ * @param {ArrayVector3D} xyz2 - Second vector as `[x, y, z]`
5
+ * @returns {ArrayVector3D} `true` if the vectors are equal, `false` otherwise
6
+ */
7
+ export const isEqual3D = (xyz1, xyz2) => xyz1[0] === xyz2[0] && xyz1[1] === xyz2[1] && xyz1[2] === xyz2[2];
@@ -0,0 +1,9 @@
1
+ import type { ArrayVector3D } from "./types";
2
+ /**
3
+ * Compares two 3D vectors using an epsilon value for floating-point comparison.
4
+ * @param {ArrayVector3D} xyz1 - First vector as `[x, y, z]`
5
+ * @param {ArrayVector3D} xyz2 - Second vector as `[x, y, z]`
6
+ * @param {number} epsilon - Tolerance for comparison (default: `Number.EPSILON`)
7
+ * @returns {boolean} `true` if the vectors are approximately equal, `false` otherwise
8
+ */
9
+ export declare const isEqualApprox3D: (xyz1: ArrayVector3D, xyz2: ArrayVector3D, epsilon?: number) => boolean;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Compares two 3D vectors using an epsilon value for floating-point comparison.
3
+ * @param {ArrayVector3D} xyz1 - First vector as `[x, y, z]`
4
+ * @param {ArrayVector3D} xyz2 - Second vector as `[x, y, z]`
5
+ * @param {number} epsilon - Tolerance for comparison (default: `Number.EPSILON`)
6
+ * @returns {boolean} `true` if the vectors are approximately equal, `false` otherwise
7
+ */
8
+ export const isEqualApprox3D = (xyz1, xyz2, epsilon = Number.EPSILON) => Math.abs(xyz1[0] - xyz2[0]) <= epsilon &&
9
+ Math.abs(xyz1[1] - xyz2[1]) <= epsilon &&
10
+ Math.abs(xyz1[2] - xyz2[2]) <= epsilon;
@@ -0,0 +1,7 @@
1
+ import type { ArrayVector3D } from "./types";
2
+ /**
3
+ * Checks if a vector has infinite components.
4
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
5
+ * @returns {boolean} `true` if the vector has infinite components, `false` otherwise
6
+ */
7
+ export declare const isInfinite3D: (xyz: ArrayVector3D) => boolean;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Checks if a vector has infinite components.
3
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
4
+ * @returns {boolean} `true` if the vector has infinite components, `false` otherwise
5
+ */
6
+ export const isInfinite3D = (xyz) => xyz[0] === Number.POSITIVE_INFINITY ||
7
+ xyz[0] === Number.NEGATIVE_INFINITY ||
8
+ xyz[1] === Number.POSITIVE_INFINITY ||
9
+ xyz[1] === Number.NEGATIVE_INFINITY ||
10
+ xyz[2] === Number.POSITIVE_INFINITY ||
11
+ xyz[2] === Number.NEGATIVE_INFINITY;
@@ -0,0 +1,7 @@
1
+ import type { ArrayVector3D } from "./types";
2
+ /**
3
+ * Checks if a 3D vector has NaN components.
4
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
5
+ * @returns {boolean} `true` if the vector has `NaN` components, `false` otherwise.
6
+ */
7
+ export declare const isNaN3D: (xyz: ArrayVector3D) => boolean;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Checks if a 3D vector has NaN components.
3
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
4
+ * @returns {boolean} `true` if the vector has `NaN` components, `false` otherwise.
5
+ */
6
+ export const isNaN3D = (xyz) => Number.isNaN(xyz[0]) || Number.isNaN(xyz[1]) || Number.isNaN(xyz[2]);
@@ -0,0 +1,8 @@
1
+ import type { ArrayVector3D } from "./types";
2
+ /**
3
+ * Checks if two 3D vectors are opposite.
4
+ * @param {ArrayVector3D} xyz1 - First vector as `[x, y, z]`
5
+ * @param {ArrayVector3D} xyz2 - Second vector as `[x, y, z]`
6
+ * @returns {boolean} `true` if the vectors are opposite, `false` otherwise
7
+ */
8
+ export declare const isOpposite3D: (xyz1: ArrayVector3D, xyz2: ArrayVector3D) => boolean;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Checks if two 3D vectors are opposite.
3
+ * @param {ArrayVector3D} xyz1 - First vector as `[x, y, z]`
4
+ * @param {ArrayVector3D} xyz2 - Second vector as `[x, y, z]`
5
+ * @returns {boolean} `true` if the vectors are opposite, `false` otherwise
6
+ */
7
+ export const isOpposite3D = (xyz1, xyz2) => xyz1[0] === -xyz2[0] && xyz1[1] === -xyz2[1] && xyz1[2] === -xyz2[2];
@@ -0,0 +1,7 @@
1
+ import type { ArrayVector3D } from "./types";
2
+ /**
3
+ * Checks if a 3D vector is zero.
4
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
5
+ * @returns {boolean} `true` if the vector is zero, `false` otherwise
6
+ */
7
+ export declare const isZero3D: (xyz: ArrayVector3D) => boolean;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Checks if a 3D vector is zero.
3
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
4
+ * @returns {boolean} `true` if the vector is zero, `false` otherwise
5
+ */
6
+ export const isZero3D = (xyz) => xyz[0] === 0 && xyz[1] === 0 && xyz[2] === 0;
@@ -0,0 +1,9 @@
1
+ import type { ArrayVector3D } from "./types";
2
+ /**
3
+ * Performs linear interpolation between two vectors.
4
+ * @param {ArrayVector3D} xyz1 - First vector as `[x, y, z]`
5
+ * @param {ArrayVector3D} xyz2 - Second vector as `[x, y, z]`
6
+ * @param {number} t - Interpolation parameter
7
+ * @returns {ArrayVector3D} The interpolated vector
8
+ */
9
+ export declare const lerp3D: (xyz1: ArrayVector3D, xyz2: ArrayVector3D, t: number) => ArrayVector3D;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Performs linear interpolation between two vectors.
3
+ * @param {ArrayVector3D} xyz1 - First vector as `[x, y, z]`
4
+ * @param {ArrayVector3D} xyz2 - Second vector as `[x, y, z]`
5
+ * @param {number} t - Interpolation parameter
6
+ * @returns {ArrayVector3D} The interpolated vector
7
+ */
8
+ export const lerp3D = (xyz1, xyz2, t) => [
9
+ xyz1[0] + (xyz2[0] - xyz1[0]) * t,
10
+ xyz1[1] + (xyz2[1] - xyz1[1]) * t,
11
+ xyz1[2] + (xyz2[2] - xyz1[2]) * t,
12
+ ];
@@ -0,0 +1,9 @@
1
+ import type { ArrayVector3D } from "./types.js";
2
+ /**
3
+ * Limits the maximum magnitude of a 3D vector.
4
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
5
+ * @param {number} max - Maximum magnitude
6
+ * @param {number} [m] - Optional current magnitude (default: `magnitude3D(xyz)`)
7
+ * @returns {ArrayVector3D} The adjusted vector
8
+ */
9
+ export declare const limitMax3D: (xyz: ArrayVector3D, max: number, m?: number) => ArrayVector3D;
@@ -0,0 +1,9 @@
1
+ import { magnitude3D } from "./magnitude-3d.js";
2
+ /**
3
+ * Limits the maximum magnitude of a 3D vector.
4
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
5
+ * @param {number} max - Maximum magnitude
6
+ * @param {number} [m] - Optional current magnitude (default: `magnitude3D(xyz)`)
7
+ * @returns {ArrayVector3D} The adjusted vector
8
+ */
9
+ export const limitMax3D = (xyz, max, m = magnitude3D(xyz)) => m > max ? [(xyz[0] / m) * max, (xyz[1] / m) * max, (xyz[2] / m) * max] : xyz;
@@ -0,0 +1,9 @@
1
+ import type { ArrayVector3D } from "./types.js";
2
+ /**
3
+ * Limits the minimum magnitude of a 3D vector.
4
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
5
+ * @param {number} min - Minimum magnitude
6
+ * @param {number} [m] - Optional current magnitude (default: `magnitude3D(xyz)`)
7
+ * @returns {ArrayVector3D} The adjusted vector
8
+ */
9
+ export declare const limitMin3D: (xyz: ArrayVector3D, min: number, m?: number) => ArrayVector3D;
@@ -0,0 +1,9 @@
1
+ import { magnitude3D } from "./magnitude-3d.js";
2
+ /**
3
+ * Limits the minimum magnitude of a 3D vector.
4
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
5
+ * @param {number} min - Minimum magnitude
6
+ * @param {number} [m] - Optional current magnitude (default: `magnitude3D(xyz)`)
7
+ * @returns {ArrayVector3D} The adjusted vector
8
+ */
9
+ export const limitMin3D = (xyz, min, m = magnitude3D(xyz)) => m < min ? [(xyz[0] / m) * min, (xyz[1] / m) * min, (xyz[2] / m) * min] : xyz;
@@ -0,0 +1,10 @@
1
+ import type { ArrayVector3D } from "./types.js";
2
+ /**
3
+ * Creates a vector pointing from the first vector to the second vector, maintaining the magnitude of the first vector.
4
+ * @param {ArrayVector3D} xyz1 - First vector as `[x, y, z]` (source direction)
5
+ * @param {ArrayVector3D} xyz2 - Second vector as `[x, y, z]` (target direction)
6
+ * @param {number} [m1] - Optional current magnitude of the first vector (default: `magnitude3D(xyz1)`)
7
+ * @param {number} [m2] - Optional current magnitude of the second vector (default: `magnitude3D(xyz2)`)
8
+ * @returns {ArrayVector3D} The look-at vector
9
+ */
10
+ export declare const lookAt3D: (xyz1: ArrayVector3D, xyz2: ArrayVector3D, m1?: number, m2?: number) => ArrayVector3D;
@@ -0,0 +1,10 @@
1
+ import { magnitude3D } from "./magnitude-3d.js";
2
+ /**
3
+ * Creates a vector pointing from the first vector to the second vector, maintaining the magnitude of the first vector.
4
+ * @param {ArrayVector3D} xyz1 - First vector as `[x, y, z]` (source direction)
5
+ * @param {ArrayVector3D} xyz2 - Second vector as `[x, y, z]` (target direction)
6
+ * @param {number} [m1] - Optional current magnitude of the first vector (default: `magnitude3D(xyz1)`)
7
+ * @param {number} [m2] - Optional current magnitude of the second vector (default: `magnitude3D(xyz2)`)
8
+ * @returns {ArrayVector3D} The look-at vector
9
+ */
10
+ export const lookAt3D = (xyz1, xyz2, m1 = magnitude3D(xyz1), m2 = magnitude3D(xyz2)) => [(xyz2[0] / m2) * m1, (xyz2[1] / m2) * m1, (xyz2[2] / m2) * m1];
@@ -0,0 +1,7 @@
1
+ import type { ArrayVector3D } from "./types";
2
+ /**
3
+ * Calculates the magnitude of a 3D vector.
4
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
5
+ * @returns {number} Magnitude of the vector
6
+ */
7
+ export declare const magnitude3D: (xyz: ArrayVector3D) => number;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Calculates the magnitude of a 3D vector.
3
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
4
+ * @returns {number} Magnitude of the vector
5
+ */
6
+ export const magnitude3D = (xyz) => Math.sqrt(xyz[0] ** 2 + xyz[1] ** 2 + xyz[2] ** 2);
@@ -0,0 +1,7 @@
1
+ import type { ArrayVector3D } from "./types";
2
+ /**
3
+ * Calculate the squared magnitude of a 3D vector.
4
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
5
+ * @returns {number} Squared magnitude
6
+ */
7
+ export declare const magnitudeSq3D: (xyz: ArrayVector3D) => number;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Calculate the squared magnitude of a 3D vector.
3
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
4
+ * @returns {number} Squared magnitude
5
+ */
6
+ export const magnitudeSq3D = (xyz) => xyz[0] ** 2 + xyz[1] ** 2 + xyz[2] ** 2;
@@ -0,0 +1,8 @@
1
+ import type { ArrayVector3D } from "./types.js";
2
+ /**
3
+ * Multiplies one 3D vector with another component-wise.
4
+ * @param {ArrayVector3D} xyz1 - First vector as `[x, y, z]`
5
+ * @param {ArrayVector3D} xyz2 - Second vector as `[x, y, z]`
6
+ * @returns {ArrayVector3D} The multiplied value
7
+ */
8
+ export declare const multiply3D: (xyz1: ArrayVector3D, xyz2: ArrayVector3D) => ArrayVector3D;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Multiplies one 3D vector with another component-wise.
3
+ * @param {ArrayVector3D} xyz1 - First vector as `[x, y, z]`
4
+ * @param {ArrayVector3D} xyz2 - Second vector as `[x, y, z]`
5
+ * @returns {ArrayVector3D} The multiplied value
6
+ */
7
+ export const multiply3D = (xyz1, xyz2) => [
8
+ xyz1[0] * xyz2[0],
9
+ xyz1[1] * xyz2[1],
10
+ xyz1[2] * xyz2[2],
11
+ ];
@@ -0,0 +1,7 @@
1
+ import type { ArrayVector3D } from "./types.js";
2
+ /**
3
+ * Negates a 3D vector.
4
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
5
+ * @returns {ArrayVector3D} The negated vector
6
+ */
7
+ export declare const negate3D: (xyz: ArrayVector3D) => ArrayVector3D;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Negates a 3D vector.
3
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
4
+ * @returns {ArrayVector3D} The negated vector
5
+ */
6
+ export const negate3D = (xyz) => [-xyz[0], -xyz[1], -xyz[2]];
@@ -0,0 +1,8 @@
1
+ import type { ArrayVector3D } from "./types.js";
2
+ /**
3
+ * Normalize a 3D vector.
4
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
5
+ * @param {number} [m] - Optional current magnitude (default: `magnitude3D(xyz)`)
6
+ * @returns {ArrayVector3D} The normalized vector
7
+ */
8
+ export declare const normalize3D: (xyz: ArrayVector3D, m?: number) => ArrayVector3D;
@@ -0,0 +1,8 @@
1
+ import { magnitude3D } from "./magnitude-3d.js";
2
+ /**
3
+ * Normalize a 3D vector.
4
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
5
+ * @param {number} [m] - Optional current magnitude (default: `magnitude3D(xyz)`)
6
+ * @returns {ArrayVector3D} The normalized vector
7
+ */
8
+ export const normalize3D = (xyz, m = magnitude3D(xyz)) => m === 0 ? [0, 0, 0] : [xyz[0] / m, xyz[1] / m, xyz[2] / m];
@@ -0,0 +1,6 @@
1
+ import type { ArrayVector3D } from "./types.js";
2
+ /**
3
+ * Creates a 3D vector with all components to to 1.0.
4
+ * @returns {ArrayVector3D} Vector `[1, 1, 1]`
5
+ */
6
+ export declare const one3D: () => ArrayVector3D;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Creates a 3D vector with all components to to 1.0.
3
+ * @returns {ArrayVector3D} Vector `[1, 1, 1]`
4
+ */
5
+ export const one3D = () => [1, 1, 1];
@@ -0,0 +1,10 @@
1
+ import type { ArrayVector3D } from "./types";
2
+ /**
3
+ * Projects one 3D vector onto the second.
4
+ * @param {ArrayVector3D} xyz1 - Vector to project
5
+ * @param {ArrayVector3D} xyz2 - Vector to project onto
6
+ * @param {number} [m1] - Optional magnitude of the vector to project (default: `magnitude3D(xyz1)`)
7
+ * @param {number} [m2] - Optional magnitude of the vector to project onto (default: `magnitude3D(xyz2)`)
8
+ * @returns {ArrayVector3D} The projected vector
9
+ */
10
+ export declare const project3D: (xyz1: ArrayVector3D, xyz2: ArrayVector3D, m1?: number, m2?: number) => ArrayVector3D;
@@ -0,0 +1,13 @@
1
+ import { magnitude3D } from "./magnitude-3d";
2
+ /**
3
+ * Projects one 3D vector onto the second.
4
+ * @param {ArrayVector3D} xyz1 - Vector to project
5
+ * @param {ArrayVector3D} xyz2 - Vector to project onto
6
+ * @param {number} [m1] - Optional magnitude of the vector to project (default: `magnitude3D(xyz1)`)
7
+ * @param {number} [m2] - Optional magnitude of the vector to project onto (default: `magnitude3D(xyz2)`)
8
+ * @returns {ArrayVector3D} The projected vector
9
+ */
10
+ export const project3D = (xyz1, xyz2, m1 = magnitude3D(xyz1), m2 = magnitude3D(xyz2)) => {
11
+ const f = m1 * Math.cos(Math.acos((xyz1[0] * xyz2[0] + xyz1[1] * xyz2[1] + xyz1[2] * xyz2[2]) / (m1 * m2)));
12
+ return [(xyz2[0] / m2) * f, (xyz2[1] / m2) * f, (xyz2[2] / m2) * f];
13
+ };
@@ -0,0 +1,7 @@
1
+ import type { ArrayVector3D } from "./types.js";
2
+ /**
3
+ * Creates a random unit 3D vector.
4
+ * @param {() => number} random - A function that returns a random number between 0 and 1 (default: `Math.random`)
5
+ * @returns {ArrayVector3D} Random unit vector
6
+ */
7
+ export declare const random3D: (random?: () => number) => ArrayVector3D;
@@ -0,0 +1,7 @@
1
+ import { fromSphericalCoords3D } from "./from-spherical-coords-3d.js";
2
+ /**
3
+ * Creates a random unit 3D vector.
4
+ * @param {() => number} random - A function that returns a random number between 0 and 1 (default: `Math.random`)
5
+ * @returns {ArrayVector3D} Random unit vector
6
+ */
7
+ export const random3D = (random = Math.random) => fromSphericalCoords3D(Math.acos(2 * random() - 1), random() * Math.PI * 2, 1);
@@ -0,0 +1,9 @@
1
+ import type { ArrayVector3D } from "./types";
2
+ /**
3
+ * Reflects a vector across a normal vector.
4
+ * The normal vector should be normalized (unit length).
5
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]` to reflect
6
+ * @param {ArrayVector3D} normal - Normal vector to reflect across (must be normalized)
7
+ * @returns {ArrayVector3D} The reflected vector
8
+ */
9
+ export declare const reflect3D: (xyz: ArrayVector3D, normal: ArrayVector3D) => ArrayVector3D;
@@ -0,0 +1,12 @@
1
+ import { dot3D } from "./dot-3d";
2
+ /**
3
+ * Reflects a vector across a normal vector.
4
+ * The normal vector should be normalized (unit length).
5
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]` to reflect
6
+ * @param {ArrayVector3D} normal - Normal vector to reflect across (must be normalized)
7
+ * @returns {ArrayVector3D} The reflected vector
8
+ */
9
+ export const reflect3D = (xyz, normal) => {
10
+ const dot = dot3D(xyz, normal);
11
+ return [xyz[0] - 2 * dot * normal[0], xyz[1] - 2 * dot * normal[1], xyz[2] - 2 * dot * normal[2]];
12
+ };
@@ -0,0 +1,9 @@
1
+ import type { ArrayVector3D } from "./types";
2
+ /**
3
+ * Rotates a 3D vector around the x-axis.
4
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
5
+ * @param {number} phi - Angle of rotation in radians
6
+ * @param {ArrayVector3D} axis - Rotation axis point (default: `[0, 0, 0]`)
7
+ * @returns {ArrayVector3D} The rotated vector
8
+ */
9
+ export declare const rotateX3D: (xyz: ArrayVector3D, phi: number, axis?: ArrayVector3D) => ArrayVector3D;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Rotates a 3D vector around the x-axis.
3
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
4
+ * @param {number} phi - Angle of rotation in radians
5
+ * @param {ArrayVector3D} axis - Rotation axis point (default: `[0, 0, 0]`)
6
+ * @returns {ArrayVector3D} The rotated vector
7
+ */
8
+ export const rotateX3D = (xyz, phi, axis = [0, 0, 0]) => {
9
+ const cosPhi = Math.cos(phi);
10
+ const sinPhi = Math.sin(phi);
11
+ if (axis[0] === 0 && axis[1] === 0 && axis[2] === 0) {
12
+ return [xyz[0], xyz[1] * cosPhi - xyz[2] * sinPhi, xyz[1] * sinPhi + xyz[2] * cosPhi];
13
+ }
14
+ // Translate point to origin (relative to axis)
15
+ const translatedY = xyz[1] - axis[1];
16
+ const translatedZ = xyz[2] - axis[2];
17
+ // Rotate around origin
18
+ const rotatedY = translatedY * cosPhi - translatedZ * sinPhi;
19
+ const rotatedZ = translatedY * sinPhi + translatedZ * cosPhi;
20
+ // Translate back
21
+ return [xyz[0], rotatedY + axis[1], rotatedZ + axis[2]];
22
+ };
@@ -0,0 +1,9 @@
1
+ import type { ArrayVector3D } from "./types";
2
+ /**
3
+ * Rotates a 3D vector around the y-axis.
4
+ * @param {ArrayVector3D} xyz - Vector as `[x, y, z]`
5
+ * @param {number} phi - Angle of rotation in radians
6
+ * @param {ArrayVector3D} axis - Rotation axis point (default: `[0, 0, 0]`)
7
+ * @returns {ArrayVector3D} The rotated vector
8
+ */
9
+ export declare const rotateY3D: (xyz: ArrayVector3D, phi: number, axis?: ArrayVector3D) => ArrayVector3D;