@ac-kit/math-geometry 0.2.2 → 0.3.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 (371) hide show
  1. package/CHANGELOG.md +228 -0
  2. package/README.md +323 -52
  3. package/dist/_brand.d.ts +14 -0
  4. package/dist/_brand.d.ts.map +1 -0
  5. package/dist/_brand.js +2 -0
  6. package/dist/_brand.js.map +1 -0
  7. package/dist/_ear-clipping.d.ts +20 -0
  8. package/dist/_ear-clipping.d.ts.map +1 -0
  9. package/dist/_ear-clipping.js +360 -0
  10. package/dist/_ear-clipping.js.map +1 -0
  11. package/dist/_ray3-intersect.d.ts +19 -0
  12. package/dist/_ray3-intersect.d.ts.map +1 -0
  13. package/dist/_ray3-intersect.js +122 -0
  14. package/dist/_ray3-intersect.js.map +1 -0
  15. package/dist/box2-array-boundary.d.ts +50 -0
  16. package/dist/box2-array-boundary.d.ts.map +1 -0
  17. package/dist/box2-array-boundary.js +97 -0
  18. package/dist/box2-array-boundary.js.map +1 -0
  19. package/dist/box2-array.d.ts +42 -0
  20. package/dist/box2-array.d.ts.map +1 -0
  21. package/dist/box2-array.js +134 -0
  22. package/dist/box2-array.js.map +1 -0
  23. package/dist/box2-componentwise.d.ts +110 -0
  24. package/dist/box2-componentwise.d.ts.map +1 -0
  25. package/dist/box2-componentwise.js +325 -0
  26. package/dist/box2-componentwise.js.map +1 -0
  27. package/dist/box2-grid-index.d.ts +67 -0
  28. package/dist/box2-grid-index.d.ts.map +1 -0
  29. package/dist/box2-grid-index.js +198 -0
  30. package/dist/box2-grid-index.js.map +1 -0
  31. package/dist/box2-record.d.ts +83 -0
  32. package/dist/box2-record.d.ts.map +1 -0
  33. package/dist/box2-record.js +124 -0
  34. package/dist/box2-record.js.map +1 -0
  35. package/dist/box2.d.ts +38 -0
  36. package/dist/box2.d.ts.map +1 -0
  37. package/dist/box2.js +97 -0
  38. package/dist/box2.js.map +1 -0
  39. package/dist/box3-array-boundary.d.ts +50 -0
  40. package/dist/box3-array-boundary.d.ts.map +1 -0
  41. package/dist/box3-array-boundary.js +107 -0
  42. package/dist/box3-array-boundary.js.map +1 -0
  43. package/dist/box3-componentwise.d.ts +110 -0
  44. package/dist/box3-componentwise.d.ts.map +1 -0
  45. package/dist/box3-componentwise.js +392 -0
  46. package/dist/box3-componentwise.js.map +1 -0
  47. package/dist/box3-record.d.ts +92 -0
  48. package/dist/box3-record.d.ts.map +1 -0
  49. package/dist/box3-record.js +147 -0
  50. package/dist/box3-record.js.map +1 -0
  51. package/dist/box3.d.ts +19 -16
  52. package/dist/box3.d.ts.map +1 -1
  53. package/dist/box3.js +73 -76
  54. package/dist/box3.js.map +1 -1
  55. package/dist/box4-array-boundary.d.ts +50 -0
  56. package/dist/box4-array-boundary.d.ts.map +1 -0
  57. package/dist/box4-array-boundary.js +117 -0
  58. package/dist/box4-array-boundary.js.map +1 -0
  59. package/dist/box4-componentwise.d.ts +110 -0
  60. package/dist/box4-componentwise.d.ts.map +1 -0
  61. package/dist/box4-componentwise.js +459 -0
  62. package/dist/box4-componentwise.js.map +1 -0
  63. package/dist/box4-record.d.ts +96 -0
  64. package/dist/box4-record.d.ts.map +1 -0
  65. package/dist/box4-record.js +167 -0
  66. package/dist/box4-record.js.map +1 -0
  67. package/dist/box4.d.ts +13 -8
  68. package/dist/box4.d.ts.map +1 -1
  69. package/dist/box4.js +27 -5
  70. package/dist/box4.js.map +1 -1
  71. package/dist/circle2-array-boundary.d.ts +51 -0
  72. package/dist/circle2-array-boundary.d.ts.map +1 -0
  73. package/dist/circle2-array-boundary.js +93 -0
  74. package/dist/circle2-array-boundary.js.map +1 -0
  75. package/dist/circle2-array.d.ts +17 -0
  76. package/dist/circle2-array.d.ts.map +1 -0
  77. package/dist/circle2-array.js +44 -0
  78. package/dist/circle2-array.js.map +1 -0
  79. package/dist/circle2-record.d.ts +81 -0
  80. package/dist/circle2-record.d.ts.map +1 -0
  81. package/dist/circle2-record.js +114 -0
  82. package/dist/circle2-record.js.map +1 -0
  83. package/dist/circle2.d.ts +27 -82
  84. package/dist/circle2.d.ts.map +1 -1
  85. package/dist/circle2.js +59 -104
  86. package/dist/circle2.js.map +1 -1
  87. package/dist/coordinates/cylindrical-record.d.ts +86 -0
  88. package/dist/coordinates/cylindrical-record.d.ts.map +1 -0
  89. package/dist/coordinates/cylindrical-record.js +114 -0
  90. package/dist/coordinates/cylindrical-record.js.map +1 -0
  91. package/dist/coordinates/horizontal-record.d.ts +86 -0
  92. package/dist/coordinates/horizontal-record.d.ts.map +1 -0
  93. package/dist/coordinates/horizontal-record.js +114 -0
  94. package/dist/coordinates/horizontal-record.js.map +1 -0
  95. package/dist/coordinates/horizontal.d.ts +48 -0
  96. package/dist/coordinates/horizontal.d.ts.map +1 -0
  97. package/dist/coordinates/horizontal.js +100 -0
  98. package/dist/coordinates/horizontal.js.map +1 -0
  99. package/dist/coordinates/index.d.ts +10 -0
  100. package/dist/coordinates/index.d.ts.map +1 -0
  101. package/dist/coordinates/index.js +10 -0
  102. package/dist/coordinates/index.js.map +1 -0
  103. package/dist/coordinates/longitude-latitude-record.d.ts +81 -0
  104. package/dist/coordinates/longitude-latitude-record.d.ts.map +1 -0
  105. package/dist/coordinates/longitude-latitude-record.js +104 -0
  106. package/dist/coordinates/longitude-latitude-record.js.map +1 -0
  107. package/dist/coordinates/longitude-latitude.d.ts +33 -0
  108. package/dist/coordinates/longitude-latitude.d.ts.map +1 -0
  109. package/dist/coordinates/longitude-latitude.js +78 -0
  110. package/dist/coordinates/longitude-latitude.js.map +1 -0
  111. package/dist/coordinates/polar-record.d.ts +77 -0
  112. package/dist/coordinates/polar-record.d.ts.map +1 -0
  113. package/dist/coordinates/polar-record.js +104 -0
  114. package/dist/coordinates/polar-record.js.map +1 -0
  115. package/dist/coordinates/polar.d.ts +28 -0
  116. package/dist/coordinates/polar.d.ts.map +1 -0
  117. package/dist/coordinates/polar.js +68 -0
  118. package/dist/coordinates/polar.js.map +1 -0
  119. package/dist/coordinates/spherical-cylindrical.d.ts +49 -0
  120. package/dist/coordinates/spherical-cylindrical.d.ts.map +1 -0
  121. package/dist/coordinates/spherical-cylindrical.js +110 -0
  122. package/dist/coordinates/spherical-cylindrical.js.map +1 -0
  123. package/dist/coordinates/spherical-record.d.ts +86 -0
  124. package/dist/coordinates/spherical-record.d.ts.map +1 -0
  125. package/dist/coordinates/spherical-record.js +114 -0
  126. package/dist/coordinates/spherical-record.js.map +1 -0
  127. package/dist/frustum3-record.d.ts +132 -0
  128. package/dist/frustum3-record.d.ts.map +1 -0
  129. package/dist/frustum3-record.js +333 -0
  130. package/dist/frustum3-record.js.map +1 -0
  131. package/dist/frustum3.d.ts +60 -0
  132. package/dist/frustum3.d.ts.map +1 -0
  133. package/dist/frustum3.js +186 -0
  134. package/dist/frustum3.js.map +1 -0
  135. package/dist/index.d.ts +36 -16
  136. package/dist/index.d.ts.map +1 -1
  137. package/dist/index.js +36 -16
  138. package/dist/index.js.map +1 -1
  139. package/dist/line2-record.d.ts +87 -0
  140. package/dist/line2-record.d.ts.map +1 -0
  141. package/dist/line2-record.js +123 -0
  142. package/dist/line2-record.js.map +1 -0
  143. package/dist/line2.d.ts +20 -33
  144. package/dist/line2.d.ts.map +1 -1
  145. package/dist/line2.js +56 -51
  146. package/dist/line2.js.map +1 -1
  147. package/dist/line3-record.d.ts +91 -0
  148. package/dist/line3-record.d.ts.map +1 -0
  149. package/dist/line3-record.js +146 -0
  150. package/dist/line3-record.js.map +1 -0
  151. package/dist/line3.d.ts +11 -24
  152. package/dist/line3.d.ts.map +1 -1
  153. package/dist/line3.js +32 -36
  154. package/dist/line3.js.map +1 -1
  155. package/dist/mesh/_generator-kit.d.ts +14 -0
  156. package/dist/mesh/_generator-kit.d.ts.map +1 -0
  157. package/dist/mesh/_generator-kit.js +39 -0
  158. package/dist/mesh/_generator-kit.js.map +1 -0
  159. package/dist/mesh/_index-kernels-u16.d.ts +43 -0
  160. package/dist/mesh/_index-kernels-u16.d.ts.map +1 -0
  161. package/dist/mesh/_index-kernels-u16.js +264 -0
  162. package/dist/mesh/_index-kernels-u16.js.map +1 -0
  163. package/dist/mesh/_index-kernels-u32.d.ts +43 -0
  164. package/dist/mesh/_index-kernels-u32.d.ts.map +1 -0
  165. package/dist/mesh/_index-kernels-u32.js +264 -0
  166. package/dist/mesh/_index-kernels-u32.js.map +1 -0
  167. package/dist/mesh/generate-box.d.ts +16 -0
  168. package/dist/mesh/generate-box.d.ts.map +1 -0
  169. package/dist/mesh/generate-box.js +79 -0
  170. package/dist/mesh/generate-box.js.map +1 -0
  171. package/dist/mesh/generate-cylinder.d.ts +25 -0
  172. package/dist/mesh/generate-cylinder.d.ts.map +1 -0
  173. package/dist/mesh/generate-cylinder.js +117 -0
  174. package/dist/mesh/generate-cylinder.js.map +1 -0
  175. package/dist/mesh/generate-heightfield.d.ts +24 -0
  176. package/dist/mesh/generate-heightfield.d.ts.map +1 -0
  177. package/dist/mesh/generate-heightfield.js +48 -0
  178. package/dist/mesh/generate-heightfield.js.map +1 -0
  179. package/dist/mesh/generate-plane.d.ts +18 -0
  180. package/dist/mesh/generate-plane.d.ts.map +1 -0
  181. package/dist/mesh/generate-plane.js +39 -0
  182. package/dist/mesh/generate-plane.js.map +1 -0
  183. package/dist/mesh/generate-sphere.d.ts +50 -0
  184. package/dist/mesh/generate-sphere.d.ts.map +1 -0
  185. package/dist/mesh/generate-sphere.js +244 -0
  186. package/dist/mesh/generate-sphere.js.map +1 -0
  187. package/dist/mesh/index.d.ts +8 -0
  188. package/dist/mesh/index.d.ts.map +1 -0
  189. package/dist/mesh/index.js +8 -0
  190. package/dist/mesh/index.js.map +1 -0
  191. package/dist/mesh/mesh3-kernels.d.ts +82 -0
  192. package/dist/mesh/mesh3-kernels.d.ts.map +1 -0
  193. package/dist/mesh/mesh3-kernels.js +180 -0
  194. package/dist/mesh/mesh3-kernels.js.map +1 -0
  195. package/dist/mesh/mesh3.d.ts +66 -0
  196. package/dist/mesh/mesh3.d.ts.map +1 -0
  197. package/dist/mesh/mesh3.js +128 -0
  198. package/dist/mesh/mesh3.js.map +1 -0
  199. package/dist/plane3-record.d.ts +88 -0
  200. package/dist/plane3-record.d.ts.map +1 -0
  201. package/dist/plane3-record.js +123 -0
  202. package/dist/plane3-record.js.map +1 -0
  203. package/dist/plane3.d.ts +42 -28
  204. package/dist/plane3.d.ts.map +1 -1
  205. package/dist/plane3.js +166 -48
  206. package/dist/plane3.js.map +1 -1
  207. package/dist/polygon2.d.ts +82 -29
  208. package/dist/polygon2.d.ts.map +1 -1
  209. package/dist/polygon2.js +236 -93
  210. package/dist/polygon2.js.map +1 -1
  211. package/dist/polygon3.d.ts +40 -21
  212. package/dist/polygon3.d.ts.map +1 -1
  213. package/dist/polygon3.js +215 -91
  214. package/dist/polygon3.js.map +1 -1
  215. package/dist/polyline2.d.ts +37 -0
  216. package/dist/polyline2.d.ts.map +1 -0
  217. package/dist/polyline2.js +146 -0
  218. package/dist/polyline2.js.map +1 -0
  219. package/dist/polyline3.d.ts +35 -0
  220. package/dist/polyline3.d.ts.map +1 -0
  221. package/dist/polyline3.js +159 -0
  222. package/dist/polyline3.js.map +1 -0
  223. package/dist/quadtree.d.ts +238 -0
  224. package/dist/quadtree.d.ts.map +1 -0
  225. package/dist/quadtree.js +1019 -0
  226. package/dist/quadtree.js.map +1 -0
  227. package/dist/ray2-record.d.ts +86 -0
  228. package/dist/ray2-record.d.ts.map +1 -0
  229. package/dist/ray2-record.js +123 -0
  230. package/dist/ray2-record.js.map +1 -0
  231. package/dist/ray2.d.ts +38 -13
  232. package/dist/ray2.d.ts.map +1 -1
  233. package/dist/ray2.js +85 -22
  234. package/dist/ray2.js.map +1 -1
  235. package/dist/ray3-array.d.ts +27 -0
  236. package/dist/ray3-array.d.ts.map +1 -0
  237. package/dist/ray3-array.js +89 -0
  238. package/dist/ray3-array.js.map +1 -0
  239. package/dist/ray3-record.d.ts +90 -0
  240. package/dist/ray3-record.d.ts.map +1 -0
  241. package/dist/ray3-record.js +146 -0
  242. package/dist/ray3-record.js.map +1 -0
  243. package/dist/ray3.d.ts +72 -25
  244. package/dist/ray3.d.ts.map +1 -1
  245. package/dist/ray3.js +233 -64
  246. package/dist/ray3.js.map +1 -1
  247. package/dist/segment2-record.d.ts +80 -0
  248. package/dist/segment2-record.d.ts.map +1 -0
  249. package/dist/segment2-record.js +122 -0
  250. package/dist/segment2-record.js.map +1 -0
  251. package/dist/segment2.d.ts +34 -19
  252. package/dist/segment2.d.ts.map +1 -1
  253. package/dist/segment2.js +88 -42
  254. package/dist/segment2.js.map +1 -1
  255. package/dist/segment3-record.d.ts +90 -0
  256. package/dist/segment3-record.d.ts.map +1 -0
  257. package/dist/segment3-record.js +146 -0
  258. package/dist/segment3-record.js.map +1 -0
  259. package/dist/segment3.d.ts +24 -12
  260. package/dist/segment3.d.ts.map +1 -1
  261. package/dist/segment3.js +67 -30
  262. package/dist/segment3.js.map +1 -1
  263. package/dist/size.d.ts +40 -0
  264. package/dist/size.d.ts.map +1 -0
  265. package/dist/size.js +72 -0
  266. package/dist/size.js.map +1 -0
  267. package/dist/sphere3-array-boundary.d.ts +51 -0
  268. package/dist/sphere3-array-boundary.d.ts.map +1 -0
  269. package/dist/sphere3-array-boundary.js +98 -0
  270. package/dist/sphere3-array-boundary.js.map +1 -0
  271. package/dist/sphere3-record.d.ts +88 -0
  272. package/dist/sphere3-record.d.ts.map +1 -0
  273. package/dist/sphere3-record.js +123 -0
  274. package/dist/sphere3-record.js.map +1 -0
  275. package/dist/sphere3.d.ts +55 -12
  276. package/dist/sphere3.d.ts.map +1 -1
  277. package/dist/sphere3.js +233 -24
  278. package/dist/sphere3.js.map +1 -1
  279. package/dist/spherical/cap.d.ts +56 -0
  280. package/dist/spherical/cap.d.ts.map +1 -0
  281. package/dist/spherical/cap.js +363 -0
  282. package/dist/spherical/cap.js.map +1 -0
  283. package/dist/spherical/great-circle.d.ts +39 -0
  284. package/dist/spherical/great-circle.d.ts.map +1 -0
  285. package/dist/spherical/great-circle.js +158 -0
  286. package/dist/spherical/great-circle.js.map +1 -0
  287. package/dist/spherical/index.d.ts +3 -0
  288. package/dist/spherical/index.d.ts.map +1 -0
  289. package/dist/spherical/index.js +3 -0
  290. package/dist/spherical/index.js.map +1 -0
  291. package/dist/triangle2-record.d.ts +91 -0
  292. package/dist/triangle2-record.d.ts.map +1 -0
  293. package/dist/triangle2-record.js +146 -0
  294. package/dist/triangle2-record.js.map +1 -0
  295. package/dist/triangle2.d.ts +29 -14
  296. package/dist/triangle2.d.ts.map +1 -1
  297. package/dist/triangle2.js +86 -22
  298. package/dist/triangle2.js.map +1 -1
  299. package/dist/triangle3-record.d.ts +97 -0
  300. package/dist/triangle3-record.d.ts.map +1 -0
  301. package/dist/triangle3-record.js +178 -0
  302. package/dist/triangle3-record.js.map +1 -0
  303. package/dist/triangle3.d.ts +41 -17
  304. package/dist/triangle3.d.ts.map +1 -1
  305. package/dist/triangle3.js +267 -38
  306. package/dist/triangle3.js.map +1 -1
  307. package/package.json +15 -8
  308. package/dist/angles.d.ts +0 -31
  309. package/dist/angles.d.ts.map +0 -1
  310. package/dist/angles.js +0 -53
  311. package/dist/angles.js.map +0 -1
  312. package/dist/coordinate-spaces.d.ts +0 -39
  313. package/dist/coordinate-spaces.d.ts.map +0 -1
  314. package/dist/coordinate-spaces.js +0 -52
  315. package/dist/coordinate-spaces.js.map +0 -1
  316. package/dist/coordinates-vec2.d.ts +0 -7
  317. package/dist/coordinates-vec2.d.ts.map +0 -1
  318. package/dist/coordinates-vec2.js +0 -35
  319. package/dist/coordinates-vec2.js.map +0 -1
  320. package/dist/coordinates-vec3.d.ts +0 -11
  321. package/dist/coordinates-vec3.d.ts.map +0 -1
  322. package/dist/coordinates-vec3.js +0 -61
  323. package/dist/coordinates-vec3.js.map +0 -1
  324. package/dist/coordinates.d.ts +0 -54
  325. package/dist/coordinates.d.ts.map +0 -1
  326. package/dist/coordinates.js +0 -2
  327. package/dist/coordinates.js.map +0 -1
  328. package/dist/euler-angles-quaternion.d.ts +0 -7
  329. package/dist/euler-angles-quaternion.d.ts.map +0 -1
  330. package/dist/euler-angles-quaternion.js +0 -100
  331. package/dist/euler-angles-quaternion.js.map +0 -1
  332. package/dist/euler-angles.d.ts +0 -33
  333. package/dist/euler-angles.d.ts.map +0 -1
  334. package/dist/euler-angles.js +0 -35
  335. package/dist/euler-angles.js.map +0 -1
  336. package/dist/geometry-vectors.d.ts +0 -11
  337. package/dist/geometry-vectors.d.ts.map +0 -1
  338. package/dist/geometry-vectors.js +0 -19
  339. package/dist/geometry-vectors.js.map +0 -1
  340. package/dist/mesh3.d.ts +0 -32
  341. package/dist/mesh3.d.ts.map +0 -1
  342. package/dist/mesh3.js +0 -142
  343. package/dist/mesh3.js.map +0 -1
  344. package/dist/point2.d.ts +0 -41
  345. package/dist/point2.d.ts.map +0 -1
  346. package/dist/point2.js +0 -92
  347. package/dist/point2.js.map +0 -1
  348. package/dist/point3.d.ts +0 -43
  349. package/dist/point3.d.ts.map +0 -1
  350. package/dist/point3.js +0 -103
  351. package/dist/point3.js.map +0 -1
  352. package/dist/point4.d.ts +0 -12
  353. package/dist/point4.d.ts.map +0 -1
  354. package/dist/point4.js +0 -28
  355. package/dist/point4.js.map +0 -1
  356. package/dist/rect2.d.ts +0 -54
  357. package/dist/rect2.d.ts.map +0 -1
  358. package/dist/rect2.js +0 -149
  359. package/dist/rect2.js.map +0 -1
  360. package/dist/size2.d.ts +0 -33
  361. package/dist/size2.d.ts.map +0 -1
  362. package/dist/size2.js +0 -81
  363. package/dist/size2.js.map +0 -1
  364. package/dist/size3.d.ts +0 -21
  365. package/dist/size3.d.ts.map +0 -1
  366. package/dist/size3.js +0 -59
  367. package/dist/size3.js.map +0 -1
  368. package/dist/size4.d.ts +0 -10
  369. package/dist/size4.d.ts.map +0 -1
  370. package/dist/size4.js +0 -16
  371. package/dist/size4.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,33 +1,53 @@
1
- export * from "./angles.js";
1
+ export * from "./box2-array-boundary.js";
2
+ export * from "./box2-array.js";
3
+ export * from "./box2-componentwise.js";
4
+ export * from "./box2-grid-index.js";
5
+ export * from "./box2-record.js";
6
+ export * from "./box2.js";
7
+ export * from "./box3-array-boundary.js";
8
+ export * from "./box3-componentwise.js";
9
+ export * from "./box3-record.js";
2
10
  export * from "./box3.js";
11
+ export * from "./box4-array-boundary.js";
12
+ export * from "./box4-componentwise.js";
13
+ export * from "./box4-record.js";
3
14
  export * from "./box4.js";
15
+ export * from "./circle2-array-boundary.js";
16
+ export * from "./circle2-array.js";
17
+ export * from "./circle2-record.js";
4
18
  export * from "./circle2.js";
5
- export * from "./coordinate-spaces.js";
6
- export * from "./coordinates-vec2.js";
7
- export * from "./coordinates-vec3.js";
8
- export * from "./coordinates.js";
9
- export * from "./euler-angles-quaternion.js";
10
- export * from "./euler-angles.js";
11
- export * from "./geometry-vectors.js";
19
+ export * from "./coordinates/index.js";
20
+ export * from "./frustum3-record.js";
21
+ export * from "./frustum3.js";
12
22
  export * from "./globals.js";
23
+ export * from "./line2-record.js";
13
24
  export * from "./line2.js";
25
+ export * from "./line3-record.js";
14
26
  export * from "./line3.js";
15
- export * from "./mesh3.js";
27
+ export * from "./mesh/index.js";
28
+ export * from "./plane3-record.js";
16
29
  export * from "./plane3.js";
17
- export * from "./point2.js";
18
- export * from "./point3.js";
19
- export * from "./point4.js";
20
30
  export * from "./polygon2.js";
21
31
  export * from "./polygon3.js";
32
+ export * from "./polyline2.js";
33
+ export * from "./polyline3.js";
34
+ export * from "./quadtree.js";
35
+ export * from "./ray2-record.js";
22
36
  export * from "./ray2.js";
37
+ export * from "./ray3-array.js";
38
+ export * from "./ray3-record.js";
23
39
  export * from "./ray3.js";
24
- export * from "./rect2.js";
40
+ export * from "./segment2-record.js";
25
41
  export * from "./segment2.js";
42
+ export * from "./segment3-record.js";
26
43
  export * from "./segment3.js";
27
- export * from "./size2.js";
28
- export * from "./size3.js";
29
- export * from "./size4.js";
44
+ export * from "./size.js";
45
+ export * from "./spherical/index.js";
46
+ export * from "./sphere3-array-boundary.js";
47
+ export * from "./sphere3-record.js";
30
48
  export * from "./sphere3.js";
49
+ export * from "./triangle2-record.js";
31
50
  export * from "./triangle2.js";
51
+ export * from "./triangle3-record.js";
32
52
  export * from "./triangle3.js";
33
53
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc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AgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC"}
package/dist/index.js CHANGED
@@ -1,33 +1,53 @@
1
- export * from "./angles.js";
1
+ export * from "./box2-array-boundary.js";
2
+ export * from "./box2-array.js";
3
+ export * from "./box2-componentwise.js";
4
+ export * from "./box2-grid-index.js";
5
+ export * from "./box2-record.js";
6
+ export * from "./box2.js";
7
+ export * from "./box3-array-boundary.js";
8
+ export * from "./box3-componentwise.js";
9
+ export * from "./box3-record.js";
2
10
  export * from "./box3.js";
11
+ export * from "./box4-array-boundary.js";
12
+ export * from "./box4-componentwise.js";
13
+ export * from "./box4-record.js";
3
14
  export * from "./box4.js";
15
+ export * from "./circle2-array-boundary.js";
16
+ export * from "./circle2-array.js";
17
+ export * from "./circle2-record.js";
4
18
  export * from "./circle2.js";
5
- export * from "./coordinate-spaces.js";
6
- export * from "./coordinates-vec2.js";
7
- export * from "./coordinates-vec3.js";
8
- export * from "./coordinates.js";
9
- export * from "./euler-angles-quaternion.js";
10
- export * from "./euler-angles.js";
11
- export * from "./geometry-vectors.js";
19
+ export * from "./coordinates/index.js";
20
+ export * from "./frustum3-record.js";
21
+ export * from "./frustum3.js";
12
22
  export * from "./globals.js";
23
+ export * from "./line2-record.js";
13
24
  export * from "./line2.js";
25
+ export * from "./line3-record.js";
14
26
  export * from "./line3.js";
15
- export * from "./mesh3.js";
27
+ export * from "./mesh/index.js";
28
+ export * from "./plane3-record.js";
16
29
  export * from "./plane3.js";
17
- export * from "./point2.js";
18
- export * from "./point3.js";
19
- export * from "./point4.js";
20
30
  export * from "./polygon2.js";
21
31
  export * from "./polygon3.js";
32
+ export * from "./polyline2.js";
33
+ export * from "./polyline3.js";
34
+ export * from "./quadtree.js";
35
+ export * from "./ray2-record.js";
22
36
  export * from "./ray2.js";
37
+ export * from "./ray3-array.js";
38
+ export * from "./ray3-record.js";
23
39
  export * from "./ray3.js";
24
- export * from "./rect2.js";
40
+ export * from "./segment2-record.js";
25
41
  export * from "./segment2.js";
42
+ export * from "./segment3-record.js";
26
43
  export * from "./segment3.js";
27
- export * from "./size2.js";
28
- export * from "./size3.js";
29
- export * from "./size4.js";
44
+ export * from "./size.js";
45
+ export * from "./spherical/index.js";
46
+ export * from "./sphere3-array-boundary.js";
47
+ export * from "./sphere3-record.js";
30
48
  export * from "./sphere3.js";
49
+ export * from "./triangle2-record.js";
31
50
  export * from "./triangle2.js";
51
+ export * from "./triangle3-record.js";
32
52
  export * from "./triangle3.js";
33
53
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B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AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,87 @@
1
+ import type { Brand_ } from "./_brand.js";
2
+ /**
3
+ * An infinite line in the plane: a point on it then a direction, which need not
4
+ * be a unit vector.
5
+ *
6
+ * A plain array of 4 binary64 numbers carrying a type-level brand, holding
7
+ * exactly the numbers one element of the matching bulk buffer holds, in the
8
+ * same order.
9
+ *
10
+ * Only {@link line2Create}, {@link line2Of}, {@link line2Clone},
11
+ * {@link line2FromArray} and the functions that write an `out` make one; see
12
+ * `Vec3` in `@ac-kit/math-linear` for the rules that bind callers who bypass
13
+ * the types.
14
+ */
15
+ export type Line2 = [
16
+ pointX: number,
17
+ pointY: number,
18
+ directionX: number,
19
+ directionY: number
20
+ ] & Brand_<"Line2">;
21
+ /** A {@link Line2} that is only read. */
22
+ export type ReadonlyLine2 = readonly [
23
+ pointX: number,
24
+ pointY: number,
25
+ directionX: number,
26
+ directionY: number
27
+ ] & Brand_<"Line2">;
28
+ /**
29
+ * Creates the line through the origin with a zero direction.
30
+ *
31
+ * Allocates; keep it out of hot loops.
32
+ */
33
+ export declare function line2Create(): Line2;
34
+ /**
35
+ * Creates the line with the components `pointX, pointY, directionX,
36
+ * directionY`, in storage order.
37
+ *
38
+ * Allocates; keep it out of hot loops.
39
+ */
40
+ export declare function line2Of(pointX: number, pointY: number, directionX: number, directionY: number): Line2;
41
+ /**
42
+ * Creates a copy of `a`. Like every creator it starts from a clean array.
43
+ *
44
+ * Allocates; keep it out of hot loops.
45
+ */
46
+ export declare function line2Clone(a: ReadonlyLine2): Line2;
47
+ /** Writes the components, in storage order, into `out`. */
48
+ export declare function line2Set(out: Line2, pointX: number, pointY: number, directionX: number, directionY: number): Line2;
49
+ /** Writes a copy of `a` into `out`. `out` may be `a`. */
50
+ export declare function line2Copy(out: Line2, a: ReadonlyLine2): Line2;
51
+ /**
52
+ * Exact component-wise equality: `−0` equals `+0`, `NaN` equals nothing, itself
53
+ * included, and an infinity equals itself. See {@link line2IsClose} for a
54
+ * tolerant test.
55
+ */
56
+ export declare function line2Equals(a: ReadonlyLine2, b: ReadonlyLine2): boolean;
57
+ /**
58
+ * Component-wise approximate equality: every pair differs by at most
59
+ * `tolerance`, an absolute bound in the caller's units, and an infinity is
60
+ * close only to itself. Not transitive, so never a basis for ordering or a
61
+ * container key: use {@link line2Equals} there.
62
+ *
63
+ * @param tolerance Defaults to `geometryConfig.defaultLinearTolerance`.
64
+ */
65
+ export declare function line2IsClose(a: ReadonlyLine2, b: ReadonlyLine2, tolerance?: number): boolean;
66
+ /**
67
+ * The checked way in from untyped data (JSON, messages, arrays of unknown
68
+ * origin): `source[offset … offset + 4)` copied into `out`, each element that
69
+ * is not a number written as `NaN`, an index past the end of `source` too, so
70
+ * `out` never holds a non-number. A cold path: buffers use {@link line2Load}.
71
+ * O(1).
72
+ *
73
+ * `source` may be `out` itself: the 4 elements are read before the first write.
74
+ *
75
+ * @param out The line to fill.
76
+ * @param source The array to read, of any length and any content.
77
+ * @param offset The index of the first component in `source`.
78
+ * @returns `out`.
79
+ */
80
+ export declare function line2FromArray(out: Line2, source: ArrayLike<number>, offset?: number): Line2;
81
+ /**
82
+ * Whether every component is a finite number: the check to run after parsing
83
+ * untrusted data or before an upload, as operations never check. A component
84
+ * that is not a number at all counts as not finite.
85
+ */
86
+ export declare function line2IsFinite(value: ReadonlyLine2): boolean;
87
+ //# sourceMappingURL=line2-record.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"line2-record.d.ts","sourceRoot":"","sources":["../src/line2-record.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAG1C;;;;;;;;;;;;GAYG;AACH,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CAAC,EACzB,MAAM,SAAI,GACR,KAAK,CAUP;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAO3D"}
@@ -0,0 +1,123 @@
1
+ // Generated from scripts/templates/record.liquid by scripts/generate-records.ts. Do not edit.
2
+ import { isCloseAbsolute, numberAtOrNaN } from "@ac-kit/core";
3
+ import { geometryConfig } from "./globals.js";
4
+ /**
5
+ * Every creator copies this array, which holds non-integer doubles and is never
6
+ * exposed: nothing a caller does can change the element kind it copies.
7
+ */
8
+ const TEMPLATE_ = [0.5, 0.5, 0.5, 0.5];
9
+ /**
10
+ * Creates the line through the origin with a zero direction.
11
+ *
12
+ * Allocates; keep it out of hot loops.
13
+ */
14
+ export function line2Create() {
15
+ const out = TEMPLATE_.slice();
16
+ out[0] = 0;
17
+ out[1] = 0;
18
+ out[2] = 0;
19
+ out[3] = 0;
20
+ return out;
21
+ }
22
+ /**
23
+ * Creates the line with the components `pointX, pointY, directionX,
24
+ * directionY`, in storage order.
25
+ *
26
+ * Allocates; keep it out of hot loops.
27
+ */
28
+ export function line2Of(pointX, pointY, directionX, directionY) {
29
+ const out = TEMPLATE_.slice();
30
+ out[0] = pointX;
31
+ out[1] = pointY;
32
+ out[2] = directionX;
33
+ out[3] = directionY;
34
+ return out;
35
+ }
36
+ /**
37
+ * Creates a copy of `a`. Like every creator it starts from a clean array.
38
+ *
39
+ * Allocates; keep it out of hot loops.
40
+ */
41
+ export function line2Clone(a) {
42
+ const out = TEMPLATE_.slice();
43
+ out[0] = a[0];
44
+ out[1] = a[1];
45
+ out[2] = a[2];
46
+ out[3] = a[3];
47
+ return out;
48
+ }
49
+ /** Writes the components, in storage order, into `out`. */
50
+ export function line2Set(out, pointX, pointY, directionX, directionY) {
51
+ out[0] = pointX;
52
+ out[1] = pointY;
53
+ out[2] = directionX;
54
+ out[3] = directionY;
55
+ return out;
56
+ }
57
+ /** Writes a copy of `a` into `out`. `out` may be `a`. */
58
+ export function line2Copy(out, a) {
59
+ out[0] = a[0];
60
+ out[1] = a[1];
61
+ out[2] = a[2];
62
+ out[3] = a[3];
63
+ return out;
64
+ }
65
+ /**
66
+ * Exact component-wise equality: `−0` equals `+0`, `NaN` equals nothing, itself
67
+ * included, and an infinity equals itself. See {@link line2IsClose} for a
68
+ * tolerant test.
69
+ */
70
+ export function line2Equals(a, b) {
71
+ return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];
72
+ }
73
+ /**
74
+ * Component-wise approximate equality: every pair differs by at most
75
+ * `tolerance`, an absolute bound in the caller's units, and an infinity is
76
+ * close only to itself. Not transitive, so never a basis for ordering or a
77
+ * container key: use {@link line2Equals} there.
78
+ *
79
+ * @param tolerance Defaults to `geometryConfig.defaultLinearTolerance`.
80
+ */
81
+ export function line2IsClose(a, b, tolerance = geometryConfig.defaultLinearTolerance) {
82
+ return (isCloseAbsolute(a[0], b[0], tolerance) &&
83
+ isCloseAbsolute(a[1], b[1], tolerance) &&
84
+ isCloseAbsolute(a[2], b[2], tolerance) &&
85
+ isCloseAbsolute(a[3], b[3], tolerance));
86
+ }
87
+ /**
88
+ * The checked way in from untyped data (JSON, messages, arrays of unknown
89
+ * origin): `source[offset … offset + 4)` copied into `out`, each element that
90
+ * is not a number written as `NaN`, an index past the end of `source` too, so
91
+ * `out` never holds a non-number. A cold path: buffers use {@link line2Load}.
92
+ * O(1).
93
+ *
94
+ * `source` may be `out` itself: the 4 elements are read before the first write.
95
+ *
96
+ * @param out The line to fill.
97
+ * @param source The array to read, of any length and any content.
98
+ * @param offset The index of the first component in `source`.
99
+ * @returns `out`.
100
+ */
101
+ export function line2FromArray(out, source, offset = 0) {
102
+ const value0 = numberAtOrNaN(source, offset);
103
+ const value1 = numberAtOrNaN(source, offset + 1);
104
+ const value2 = numberAtOrNaN(source, offset + 2);
105
+ const value3 = numberAtOrNaN(source, offset + 3);
106
+ out[0] = value0;
107
+ out[1] = value1;
108
+ out[2] = value2;
109
+ out[3] = value3;
110
+ return out;
111
+ }
112
+ /**
113
+ * Whether every component is a finite number: the check to run after parsing
114
+ * untrusted data or before an upload, as operations never check. A component
115
+ * that is not a number at all counts as not finite.
116
+ */
117
+ export function line2IsFinite(value) {
118
+ return (Number.isFinite(value[0]) &&
119
+ Number.isFinite(value[1]) &&
120
+ Number.isFinite(value[2]) &&
121
+ Number.isFinite(value[3]));
122
+ }
123
+ //# sourceMappingURL=line2-record.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"line2-record.js","sourceRoot":"","sources":["../src/line2-record.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAE9F,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG9D,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAgC9C;;;GAGG;AACH,MAAM,SAAS,GAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAE1D;;;;GAIG;AACH,MAAM,UAAU,WAAW;IAC1B,MAAM,GAAG,GAAG,SAAS,CAAC,KAAK,EAAW,CAAC;IACvC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACX,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACX,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACX,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACX,OAAO,GAAG,CAAC;AACZ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,OAAO,CACtB,MAAc,EACd,MAAc,EACd,UAAkB,EAClB,UAAkB;IAElB,MAAM,GAAG,GAAG,SAAS,CAAC,KAAK,EAAW,CAAC;IACvC,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;IAChB,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;IAChB,GAAG,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC;IACpB,GAAG,CAAC,CAAC,CAAC,GAAG,UAAU,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GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;IAChB,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;IAChB,OAAO,GAAG,CAAC;AACZ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,KAAoB;IACjD,OAAO,CACN,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACzB,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACzB,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACzB,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CACzB,CAAC;AACH,CAAC"}
package/dist/line2.d.ts CHANGED
@@ -1,43 +1,30 @@
1
- import { Vec2 } from "@ac-kit/math-linear";
2
- import { Point2 } from "./point2.js";
3
- export type Line2 = {
4
- point: Point2;
5
- direction: Vec2;
6
- };
7
- /** Returns the closest point on the infinite line to `p`. */
8
- export declare function line2ClosestPoint(line: Line2, p: Point2): Point2;
1
+ import type { ReadonlyVec2, Vec2 } from "@ac-kit/math-linear";
2
+ import type { ReadonlyLine2 } from "./line2-record.js";
9
3
  /**
10
- * Whether `p` lies on `line`, within `tolerance` of it.
11
- *
12
- * Tolerant by necessity: a line has zero area, so no constructed point ever
13
- * lands on one exactly. `tolerance` is a distance in the caller's own units.
4
+ * Writes the point of the line nearest to `point` into `out`; a line with a
5
+ * zero direction is the point it passes through.
14
6
  */
15
- export declare function line2ContainsPoint(line: Line2, p: Point2, tolerance?: number): boolean;
16
- export declare function line2DistanceToPoint(line: Line2, p: Point2): number;
7
+ export declare function line2ClosestPoint(out: Vec2, line: ReadonlyLine2, point: ReadonlyVec2): Vec2;
8
+ /** The distance from `point` to the line. */
9
+ export declare function line2DistanceToPoint(line: ReadonlyLine2, point: ReadonlyVec2): number;
17
10
  /**
18
- * Whether `a` and `b` are the same infinite line, within tolerance.
19
- *
20
- * Tolerant rather than exact: the same line can be built from any point on it
21
- * and any scaling of its direction, so exact component equality would answer a
22
- * question nobody is asking. Directions are compared through their normalised
23
- * dot product, and opposite directions denote the same line.
11
+ * Whether `point` lies on the line, within `tolerance` of it.
24
12
  *
25
- * @param linearTolerance - Distance, in the caller's units, within which a
26
- * point still counts as lying on the other line.
27
- * @param angularTolerance - Dimensionless residual on `|dot| - 1`, within which
28
- * two unit directions still count as collinear.
13
+ * @param tolerance A distance in the caller's units; defaults to
14
+ * `geometryConfig.defaultLinearTolerance`.
29
15
  */
30
- export declare function line2Equals(a: Line2, b: Line2, linearTolerance?: number, angularTolerance?: number): boolean;
16
+ export declare function line2ContainsPoint(line: ReadonlyLine2, point: ReadonlyVec2, tolerance?: number): boolean;
31
17
  /**
32
- * Returns the intersection point of two infinite lines, or `null` if they are
33
- * parallel.
18
+ * Whether the two lines cross at one point, and where: on `true`, `out` holds
19
+ * that point. On `false` (parallel, a zero direction included) `out` holds
20
+ * `NaN`, never a stale value.
34
21
  *
35
- * The parallel test scales the cross product by both direction lengths, so it
36
- * is an angular threshold rather than a raw one — rescaling either direction
37
- * leaves the answer unchanged, which a bare bound on `denom` would not.
22
+ * The parallel test is scale-free: the lines count as parallel when `|d₁ × d₂|
23
+ * ≤ tolerance · |d₁| · |d₂|`, so rescaling a direction never changes the
24
+ * verdict.
38
25
  *
39
- * @param tolerance - Dimensionless bound on `sin` of the angle between the two
40
- * directions, below which they count as parallel.
26
+ * @param tolerance Dimensionless bound on the sine of the angle between the
27
+ * directions; defaults to `geometryConfig.defaultAngularTolerance`.
41
28
  */
42
- export declare function line2Intersect(a: Line2, b: Line2, tolerance?: number): Point2 | null;
29
+ export declare function line2IntersectLine2(out: Vec2, a: ReadonlyLine2, b: ReadonlyLine2, tolerance?: number): boolean;
43
30
  //# sourceMappingURL=line2.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"line2.d.ts","sourceRoot":"","sources":["../src/line2.ts"],"names":[],"mappings":"AACA,OAAO,EAC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CAWR;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,aAAa,EACnB,KAAK,EAAE,YAAY,EACnB,SAAS,GAAE,MAA8C,GACvD,OAAO,CAET;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAClC,GAAG,EAAE,IAAI,EACT,CAAC,EAAE,aAAa,EAChB,CAAC,EAAE,aAAa,EAChB,SAAS,GAAE,MAA+C,GACxD,OAAO,CAwBT"}
package/dist/line2.js CHANGED
@@ -1,68 +1,73 @@
1
- import { isCloseAbsolute } from "@ac-kit/core";
2
- import { vec2Cross, vec2Dot, vec2Length, vec2Normalize, } from "@ac-kit/math-linear";
3
1
  import { diffOfProducts } from "@ac-kit/math-scalar";
4
2
  import { geometryConfig } from "./globals.js";
5
- /** Returns the closest point on the infinite line to `p`. */
6
- export function line2ClosestPoint(line, p) {
7
- const d = vec2Normalize(line.direction);
8
- const v = [p.x - line.point.x, p.y - line.point.y];
9
- const t = vec2Dot(v, d);
10
- return { x: line.point.x + d[0] * t, y: line.point.y + d[1] * t };
11
- }
12
3
  /**
13
- * Whether `p` lies on `line`, within `tolerance` of it.
14
- *
15
- * Tolerant by necessity: a line has zero area, so no constructed point ever
16
- * lands on one exactly. `tolerance` is a distance in the caller's own units.
4
+ * Writes the point of the line nearest to `point` into `out`; a line with a
5
+ * zero direction is the point it passes through.
17
6
  */
18
- export function line2ContainsPoint(line, p, tolerance = geometryConfig.defaultLinearTolerance) {
19
- return line2DistanceToPoint(line, p) <= tolerance;
7
+ export function line2ClosestPoint(out, line, point) {
8
+ const lengthSquared = line[2] * line[2] + line[3] * line[3];
9
+ const t = lengthSquared === 0
10
+ ? 0
11
+ : ((point[0] - line[0]) * line[2] + (point[1] - line[1]) * line[3]) /
12
+ lengthSquared;
13
+ out[0] = line[0] + line[2] * t;
14
+ out[1] = line[1] + line[3] * t;
15
+ return out;
20
16
  }
21
- export function line2DistanceToPoint(line, p) {
22
- const d = vec2Normalize(line.direction);
23
- const v = [p.x - line.point.x, p.y - line.point.y];
24
- return Math.abs(vec2Cross(v, d));
17
+ /** The distance from `point` to the line. */
18
+ export function line2DistanceToPoint(line, point) {
19
+ const lengthSquared = line[2] * line[2] + line[3] * line[3];
20
+ const fromX = point[0] - line[0];
21
+ const fromY = point[1] - line[1];
22
+ if (lengthSquared === 0) {
23
+ return Math.sqrt(fromX * fromX + fromY * fromY);
24
+ }
25
+ return (Math.abs(diffOfProducts(fromX, line[3], fromY, line[2])) /
26
+ Math.sqrt(lengthSquared));
25
27
  }
26
28
  /**
27
- * Whether `a` and `b` are the same infinite line, within tolerance.
29
+ * Whether `point` lies on the line, within `tolerance` of it.
28
30
  *
29
- * Tolerant rather than exact: the same line can be built from any point on it
30
- * and any scaling of its direction, so exact component equality would answer a
31
- * question nobody is asking. Directions are compared through their normalised
32
- * dot product, and opposite directions denote the same line.
33
- *
34
- * @param linearTolerance - Distance, in the caller's units, within which a
35
- * point still counts as lying on the other line.
36
- * @param angularTolerance - Dimensionless residual on `|dot| - 1`, within which
37
- * two unit directions still count as collinear.
31
+ * @param tolerance A distance in the caller's units; defaults to
32
+ * `geometryConfig.defaultLinearTolerance`.
38
33
  */
39
- export function line2Equals(a, b, linearTolerance = geometryConfig.defaultLinearTolerance, angularTolerance = geometryConfig.defaultAngularTolerance) {
40
- const dot = vec2Dot(vec2Normalize(a.direction), vec2Normalize(b.direction));
41
- return (isCloseAbsolute(Math.abs(dot), 1, angularTolerance) &&
42
- line2ContainsPoint(a, b.point, linearTolerance));
34
+ export function line2ContainsPoint(line, point, tolerance = geometryConfig.defaultLinearTolerance) {
35
+ return line2DistanceToPoint(line, point) <= tolerance;
43
36
  }
44
37
  /**
45
- * Returns the intersection point of two infinite lines, or `null` if they are
46
- * parallel.
38
+ * Whether the two lines cross at one point, and where: on `true`, `out` holds
39
+ * that point. On `false` (parallel, a zero direction included) `out` holds
40
+ * `NaN`, never a stale value.
47
41
  *
48
- * The parallel test scales the cross product by both direction lengths, so it
49
- * is an angular threshold rather than a raw one — rescaling either direction
50
- * leaves the answer unchanged, which a bare bound on `denom` would not.
42
+ * The parallel test is scale-free: the lines count as parallel when `|d₁ × d₂|
43
+ * ≤ tolerance · |d₁| · |d₂|`, so rescaling a direction never changes the
44
+ * verdict.
51
45
  *
52
- * @param tolerance - Dimensionless bound on `sin` of the angle between the two
53
- * directions, below which they count as parallel.
46
+ * @param tolerance Dimensionless bound on the sine of the angle between the
47
+ * directions; defaults to `geometryConfig.defaultAngularTolerance`.
54
48
  */
55
- export function line2Intersect(a, b, tolerance = geometryConfig.defaultAngularTolerance) {
56
- const [dx1, dy1] = a.direction;
57
- const [dx2, dy2] = b.direction;
58
- const denom = diffOfProducts(dx1, dy2, dy1, dx2);
59
- const scale = vec2Length(a.direction) * vec2Length(b.direction);
60
- if (Math.abs(denom) <= tolerance * scale) {
61
- return null; // parallel, or a degenerate zero-length direction
49
+ export function line2IntersectLine2(out, a, b, tolerance = geometryConfig.defaultAngularTolerance) {
50
+ const dx1 = a[2];
51
+ const dy1 = a[3];
52
+ const dx2 = b[2];
53
+ const dy2 = b[3];
54
+ const denominator = diffOfProducts(dx1, dy2, dy1, dx2);
55
+ const scale = Math.sqrt(dx1 * dx1 + dy1 * dy1) * Math.sqrt(dx2 * dx2 + dy2 * dy2);
56
+ if (Math.abs(denominator) <= tolerance * scale || Number.isNaN(denominator)) {
57
+ out[0] = Number.NaN;
58
+ out[1] = Number.NaN;
59
+ return false;
60
+ }
61
+ const t = diffOfProducts(b[0] - a[0], dy2, b[1] - a[1], dx2) / denominator;
62
+ const x = a[0] + dx1 * t;
63
+ const y = a[1] + dy1 * t;
64
+ if (!(Number.isFinite(x) && Number.isFinite(y))) {
65
+ out[0] = Number.NaN;
66
+ out[1] = Number.NaN;
67
+ return false;
62
68
  }
63
- const dx = b.point.x - a.point.x;
64
- const dy = b.point.y - a.point.y;
65
- const t = diffOfProducts(dx, dy2, dy, dx2) / denom;
66
- return { x: a.point.x + dx1 * t, y: a.point.y + dy1 * t };
69
+ out[0] = x;
70
+ out[1] = y;
71
+ return true;
67
72
  }
68
73
  //# sourceMappingURL=line2.js.map
package/dist/line2.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"line2.js","sourceRoot":"","sources":["../src/line2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAEN,SAAS,EACT,OAAO,EACP,UAAU,EACV,aAAa,GACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAQ9C,6DAA6D;AAC7D,MAAM,UAAU,iBAAiB,CAAC,IAAW,EAAE,CAAS;IACvD,MAAM,CAAC,GAAG,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACxC,MAAM,CAAC,GAAS,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACzD,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACxB,OAAO,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;AACnE,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CACjC,IAAW,EACX,CAAS,EACT,SAAS,GAAW,cAAc,CAAC,sBAAsB;IAEzD,OAAO,oBAAoB,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,SAAS,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,IAAW,EAAE,CAAS;IAC1D,MAA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