@itwin/core-geometry 5.0.0-dev.2 → 5.0.0-dev.20

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 (278) hide show
  1. package/CHANGELOG.md +19 -1
  2. package/lib/cjs/bspline/BSplineCurveOps.d.ts.map +1 -1
  3. package/lib/cjs/bspline/BSplineCurveOps.js +18 -21
  4. package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
  5. package/lib/cjs/curve/Arc3d.d.ts +30 -7
  6. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  7. package/lib/cjs/curve/Arc3d.js +53 -7
  8. package/lib/cjs/curve/Arc3d.js.map +1 -1
  9. package/lib/cjs/curve/CurveCollection.d.ts +16 -2
  10. package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
  11. package/lib/cjs/curve/CurveCollection.js +33 -2
  12. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  13. package/lib/cjs/curve/CurveFactory.d.ts +81 -53
  14. package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
  15. package/lib/cjs/curve/CurveFactory.js +190 -103
  16. package/lib/cjs/curve/CurveFactory.js.map +1 -1
  17. package/lib/cjs/curve/LineString3d.d.ts +12 -8
  18. package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
  19. package/lib/cjs/curve/LineString3d.js +29 -8
  20. package/lib/cjs/curve/LineString3d.js.map +1 -1
  21. package/lib/cjs/curve/Loop.d.ts +12 -6
  22. package/lib/cjs/curve/Loop.d.ts.map +1 -1
  23. package/lib/cjs/curve/Loop.js +12 -6
  24. package/lib/cjs/curve/Loop.js.map +1 -1
  25. package/lib/cjs/curve/Query/CylindricalRange.d.ts +8 -6
  26. package/lib/cjs/curve/Query/CylindricalRange.d.ts.map +1 -1
  27. package/lib/cjs/curve/Query/CylindricalRange.js +13 -9
  28. package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
  29. package/lib/cjs/curve/StrokeOptions.d.ts +1 -1
  30. package/lib/cjs/curve/StrokeOptions.d.ts.map +1 -1
  31. package/lib/cjs/curve/StrokeOptions.js.map +1 -1
  32. package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.d.ts.map +1 -1
  33. package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js +24 -18
  34. package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
  35. package/lib/cjs/geometry3d/AngleSweep.d.ts +1 -1
  36. package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
  37. package/lib/cjs/geometry3d/AngleSweep.js +1 -1
  38. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  39. package/lib/cjs/geometry3d/BarycentricTriangle.d.ts +14 -8
  40. package/lib/cjs/geometry3d/BarycentricTriangle.d.ts.map +1 -1
  41. package/lib/cjs/geometry3d/BarycentricTriangle.js +17 -8
  42. package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
  43. package/lib/cjs/geometry3d/FrameBuilder.js +4 -4
  44. package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
  45. package/lib/cjs/geometry3d/GrowableFloat64Array.d.ts +2 -0
  46. package/lib/cjs/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
  47. package/lib/cjs/geometry3d/GrowableFloat64Array.js +4 -0
  48. package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
  49. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +32 -10
  50. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  51. package/lib/cjs/geometry3d/GrowableXYZArray.js +54 -16
  52. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  53. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +13 -2
  54. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  55. package/lib/cjs/geometry3d/IndexedXYZCollection.js +24 -10
  56. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  57. package/lib/cjs/geometry3d/Matrix3d.d.ts +11 -8
  58. package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
  59. package/lib/cjs/geometry3d/Matrix3d.js +28 -26
  60. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  61. package/lib/cjs/geometry3d/Point3dArrayCarrier.js +1 -1
  62. package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
  63. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +6 -6
  64. package/lib/cjs/geometry3d/Point3dVector3d.js +6 -6
  65. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  66. package/lib/cjs/geometry3d/PolygonOps.d.ts +12 -6
  67. package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
  68. package/lib/cjs/geometry3d/PolygonOps.js +94 -47
  69. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  70. package/lib/cjs/geometry3d/PolylineOps.d.ts +7 -4
  71. package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
  72. package/lib/cjs/geometry3d/PolylineOps.js +7 -4
  73. package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
  74. package/lib/cjs/geometry4d/MomentData.d.ts +72 -73
  75. package/lib/cjs/geometry4d/MomentData.d.ts.map +1 -1
  76. package/lib/cjs/geometry4d/MomentData.js +62 -64
  77. package/lib/cjs/geometry4d/MomentData.js.map +1 -1
  78. package/lib/cjs/numerics/Polynomials.d.ts +5 -5
  79. package/lib/cjs/numerics/Polynomials.js +6 -6
  80. package/lib/cjs/numerics/Polynomials.js.map +1 -1
  81. package/lib/cjs/polyface/AuxData.d.ts +2 -2
  82. package/lib/cjs/polyface/AuxData.d.ts.map +1 -1
  83. package/lib/cjs/polyface/AuxData.js +11 -3
  84. package/lib/cjs/polyface/AuxData.js.map +1 -1
  85. package/lib/cjs/polyface/Polyface.d.ts +3 -5
  86. package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
  87. package/lib/cjs/polyface/Polyface.js +6 -13
  88. package/lib/cjs/polyface/Polyface.js.map +1 -1
  89. package/lib/cjs/polyface/PolyfaceBuilder.d.ts +13 -6
  90. package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
  91. package/lib/cjs/polyface/PolyfaceBuilder.js +65 -38
  92. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  93. package/lib/cjs/polyface/PolyfaceData.d.ts +13 -3
  94. package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
  95. package/lib/cjs/polyface/PolyfaceData.js +21 -4
  96. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  97. package/lib/cjs/polyface/PolyfaceQuery.d.ts +2 -2
  98. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  99. package/lib/cjs/polyface/PolyfaceQuery.js +4 -3
  100. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  101. package/lib/cjs/serialization/GeometrySamples.d.ts +5 -5
  102. package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
  103. package/lib/cjs/serialization/GeometrySamples.js +5 -5
  104. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  105. package/lib/cjs/solid/Box.d.ts +9 -3
  106. package/lib/cjs/solid/Box.d.ts.map +1 -1
  107. package/lib/cjs/solid/Box.js +10 -5
  108. package/lib/cjs/solid/Box.js.map +1 -1
  109. package/lib/cjs/solid/Cone.d.ts +3 -2
  110. package/lib/cjs/solid/Cone.d.ts.map +1 -1
  111. package/lib/cjs/solid/Cone.js +3 -3
  112. package/lib/cjs/solid/Cone.js.map +1 -1
  113. package/lib/cjs/solid/LinearSweep.d.ts +9 -3
  114. package/lib/cjs/solid/LinearSweep.d.ts.map +1 -1
  115. package/lib/cjs/solid/LinearSweep.js +9 -4
  116. package/lib/cjs/solid/LinearSweep.js.map +1 -1
  117. package/lib/cjs/solid/RotationalSweep.d.ts +15 -4
  118. package/lib/cjs/solid/RotationalSweep.d.ts.map +1 -1
  119. package/lib/cjs/solid/RotationalSweep.js +20 -7
  120. package/lib/cjs/solid/RotationalSweep.js.map +1 -1
  121. package/lib/cjs/solid/RuledSweep.d.ts +35 -26
  122. package/lib/cjs/solid/RuledSweep.d.ts.map +1 -1
  123. package/lib/cjs/solid/RuledSweep.js +41 -28
  124. package/lib/cjs/solid/RuledSweep.js.map +1 -1
  125. package/lib/cjs/solid/SolidPrimitive.d.ts +12 -11
  126. package/lib/cjs/solid/SolidPrimitive.d.ts.map +1 -1
  127. package/lib/cjs/solid/SolidPrimitive.js +8 -5
  128. package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
  129. package/lib/cjs/solid/Sphere.d.ts +17 -7
  130. package/lib/cjs/solid/Sphere.d.ts.map +1 -1
  131. package/lib/cjs/solid/Sphere.js +22 -16
  132. package/lib/cjs/solid/Sphere.js.map +1 -1
  133. package/lib/cjs/solid/SweepContour.d.ts +1 -1
  134. package/lib/cjs/solid/SweepContour.js +1 -1
  135. package/lib/cjs/solid/SweepContour.js.map +1 -1
  136. package/lib/cjs/solid/TorusPipe.d.ts +8 -2
  137. package/lib/cjs/solid/TorusPipe.d.ts.map +1 -1
  138. package/lib/cjs/solid/TorusPipe.js +9 -5
  139. package/lib/cjs/solid/TorusPipe.js.map +1 -1
  140. package/lib/esm/bspline/BSplineCurveOps.d.ts.map +1 -1
  141. package/lib/esm/bspline/BSplineCurveOps.js +18 -21
  142. package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
  143. package/lib/esm/curve/Arc3d.d.ts +30 -7
  144. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  145. package/lib/esm/curve/Arc3d.js +53 -7
  146. package/lib/esm/curve/Arc3d.js.map +1 -1
  147. package/lib/esm/curve/CurveCollection.d.ts +16 -2
  148. package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
  149. package/lib/esm/curve/CurveCollection.js +33 -2
  150. package/lib/esm/curve/CurveCollection.js.map +1 -1
  151. package/lib/esm/curve/CurveFactory.d.ts +81 -53
  152. package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
  153. package/lib/esm/curve/CurveFactory.js +190 -103
  154. package/lib/esm/curve/CurveFactory.js.map +1 -1
  155. package/lib/esm/curve/LineString3d.d.ts +12 -8
  156. package/lib/esm/curve/LineString3d.d.ts.map +1 -1
  157. package/lib/esm/curve/LineString3d.js +29 -8
  158. package/lib/esm/curve/LineString3d.js.map +1 -1
  159. package/lib/esm/curve/Loop.d.ts +12 -6
  160. package/lib/esm/curve/Loop.d.ts.map +1 -1
  161. package/lib/esm/curve/Loop.js +12 -6
  162. package/lib/esm/curve/Loop.js.map +1 -1
  163. package/lib/esm/curve/Query/CylindricalRange.d.ts +8 -6
  164. package/lib/esm/curve/Query/CylindricalRange.d.ts.map +1 -1
  165. package/lib/esm/curve/Query/CylindricalRange.js +13 -9
  166. package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
  167. package/lib/esm/curve/StrokeOptions.d.ts +1 -1
  168. package/lib/esm/curve/StrokeOptions.d.ts.map +1 -1
  169. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  170. package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.d.ts.map +1 -1
  171. package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js +24 -18
  172. package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
  173. package/lib/esm/geometry3d/AngleSweep.d.ts +1 -1
  174. package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
  175. package/lib/esm/geometry3d/AngleSweep.js +1 -1
  176. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  177. package/lib/esm/geometry3d/BarycentricTriangle.d.ts +14 -8
  178. package/lib/esm/geometry3d/BarycentricTriangle.d.ts.map +1 -1
  179. package/lib/esm/geometry3d/BarycentricTriangle.js +17 -8
  180. package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
  181. package/lib/esm/geometry3d/FrameBuilder.js +4 -4
  182. package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
  183. package/lib/esm/geometry3d/GrowableFloat64Array.d.ts +2 -0
  184. package/lib/esm/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
  185. package/lib/esm/geometry3d/GrowableFloat64Array.js +4 -0
  186. package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
  187. package/lib/esm/geometry3d/GrowableXYZArray.d.ts +32 -10
  188. package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  189. package/lib/esm/geometry3d/GrowableXYZArray.js +54 -16
  190. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  191. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +13 -2
  192. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  193. package/lib/esm/geometry3d/IndexedXYZCollection.js +24 -10
  194. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  195. package/lib/esm/geometry3d/Matrix3d.d.ts +11 -8
  196. package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
  197. package/lib/esm/geometry3d/Matrix3d.js +28 -26
  198. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  199. package/lib/esm/geometry3d/Point3dArrayCarrier.js +1 -1
  200. package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
  201. package/lib/esm/geometry3d/Point3dVector3d.d.ts +6 -6
  202. package/lib/esm/geometry3d/Point3dVector3d.js +6 -6
  203. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  204. package/lib/esm/geometry3d/PolygonOps.d.ts +12 -6
  205. package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
  206. package/lib/esm/geometry3d/PolygonOps.js +94 -47
  207. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  208. package/lib/esm/geometry3d/PolylineOps.d.ts +7 -4
  209. package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
  210. package/lib/esm/geometry3d/PolylineOps.js +7 -4
  211. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  212. package/lib/esm/geometry4d/MomentData.d.ts +72 -73
  213. package/lib/esm/geometry4d/MomentData.d.ts.map +1 -1
  214. package/lib/esm/geometry4d/MomentData.js +62 -64
  215. package/lib/esm/geometry4d/MomentData.js.map +1 -1
  216. package/lib/esm/numerics/Polynomials.d.ts +5 -5
  217. package/lib/esm/numerics/Polynomials.js +6 -6
  218. package/lib/esm/numerics/Polynomials.js.map +1 -1
  219. package/lib/esm/polyface/AuxData.d.ts +2 -2
  220. package/lib/esm/polyface/AuxData.d.ts.map +1 -1
  221. package/lib/esm/polyface/AuxData.js +11 -3
  222. package/lib/esm/polyface/AuxData.js.map +1 -1
  223. package/lib/esm/polyface/Polyface.d.ts +3 -5
  224. package/lib/esm/polyface/Polyface.d.ts.map +1 -1
  225. package/lib/esm/polyface/Polyface.js +6 -13
  226. package/lib/esm/polyface/Polyface.js.map +1 -1
  227. package/lib/esm/polyface/PolyfaceBuilder.d.ts +13 -6
  228. package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
  229. package/lib/esm/polyface/PolyfaceBuilder.js +65 -38
  230. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  231. package/lib/esm/polyface/PolyfaceData.d.ts +13 -3
  232. package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
  233. package/lib/esm/polyface/PolyfaceData.js +21 -4
  234. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  235. package/lib/esm/polyface/PolyfaceQuery.d.ts +2 -2
  236. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  237. package/lib/esm/polyface/PolyfaceQuery.js +4 -3
  238. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  239. package/lib/esm/serialization/GeometrySamples.d.ts +5 -5
  240. package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
  241. package/lib/esm/serialization/GeometrySamples.js +5 -5
  242. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  243. package/lib/esm/solid/Box.d.ts +9 -3
  244. package/lib/esm/solid/Box.d.ts.map +1 -1
  245. package/lib/esm/solid/Box.js +10 -5
  246. package/lib/esm/solid/Box.js.map +1 -1
  247. package/lib/esm/solid/Cone.d.ts +3 -2
  248. package/lib/esm/solid/Cone.d.ts.map +1 -1
  249. package/lib/esm/solid/Cone.js +3 -3
  250. package/lib/esm/solid/Cone.js.map +1 -1
  251. package/lib/esm/solid/LinearSweep.d.ts +9 -3
  252. package/lib/esm/solid/LinearSweep.d.ts.map +1 -1
  253. package/lib/esm/solid/LinearSweep.js +9 -4
  254. package/lib/esm/solid/LinearSweep.js.map +1 -1
  255. package/lib/esm/solid/RotationalSweep.d.ts +15 -4
  256. package/lib/esm/solid/RotationalSweep.d.ts.map +1 -1
  257. package/lib/esm/solid/RotationalSweep.js +20 -7
  258. package/lib/esm/solid/RotationalSweep.js.map +1 -1
  259. package/lib/esm/solid/RuledSweep.d.ts +35 -26
  260. package/lib/esm/solid/RuledSweep.d.ts.map +1 -1
  261. package/lib/esm/solid/RuledSweep.js +41 -28
  262. package/lib/esm/solid/RuledSweep.js.map +1 -1
  263. package/lib/esm/solid/SolidPrimitive.d.ts +12 -11
  264. package/lib/esm/solid/SolidPrimitive.d.ts.map +1 -1
  265. package/lib/esm/solid/SolidPrimitive.js +8 -5
  266. package/lib/esm/solid/SolidPrimitive.js.map +1 -1
  267. package/lib/esm/solid/Sphere.d.ts +17 -7
  268. package/lib/esm/solid/Sphere.d.ts.map +1 -1
  269. package/lib/esm/solid/Sphere.js +22 -16
  270. package/lib/esm/solid/Sphere.js.map +1 -1
  271. package/lib/esm/solid/SweepContour.d.ts +1 -1
  272. package/lib/esm/solid/SweepContour.js +1 -1
  273. package/lib/esm/solid/SweepContour.js.map +1 -1
  274. package/lib/esm/solid/TorusPipe.d.ts +8 -2
  275. package/lib/esm/solid/TorusPipe.d.ts.map +1 -1
  276. package/lib/esm/solid/TorusPipe.js +9 -5
  277. package/lib/esm/solid/TorusPipe.js.map +1 -1
  278. package/package.json +4 -4
@@ -25,7 +25,7 @@ class Point3dArrayCarrier extends IndexedXYZCollection_1.IndexedReadWriteXYZColl
25
25
  }
26
26
  /** Test if `index` is a valid index into the array. */
27
27
  isValidIndex(index) {
28
- return index >= 0 && index < this.data.length;
28
+ return this.isIndexValid(index);
29
29
  }
30
30
  /**
31
31
  * Access by index, returning strongly typed Point3d
@@ -1 +1 @@
1
- {"version":3,"file":"Point3dArrayCarrier.js","sourceRoot":"","sources":["../../../src/geometry3d/Point3dArrayCarrier.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,iEAAuE;AACvE,uDAAsD;AAGtD;;;;;;GAMG;AACH,MAAa,mBAAoB,SAAQ,oDAA6B;IAGpE,wCAAwC;IACxC,YAAmB,IAAe;QAChC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IACD,uDAAuD;IAChD,YAAY,CAAC,KAAa;QAC/B,OAAO,KAAK,IAAI,CAAC,IAAI,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;IAChD,CAAC;IACD;;;;;;OAMG;IACI,6BAA6B,CAAC,KAAa,EAAE,MAAgB;QAClE,IAAI,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;YAC7B,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAChC,OAAO,yBAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;QAC9D,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD;;;;;OAKG;IACI,+BAA+B,CAAC,KAAa,EAAE,MAAgB;QACpE,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChC,OAAO,yBAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC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;YAC3D,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAC9D,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD;;;;OAIG;IACI,kBAAkB,CAAC,MAAc,EAAE,MAAc;QACtD,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,MAAM,IAAI,CAAC,IAAI,MAAM,GAAG,CAAC,IAAI,MAAM,IAAI,CAAC,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3D,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QACvD,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,yDAAyD;IACzC,WAAW,CAAC,CAAS;QACnC,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;CACF;AAnOD,kDAmOC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ArraysAndInterfaces\r\n */\r\n\r\nimport { IndexedReadWriteXYZCollection } from \"./IndexedXYZCollection\";\r\nimport { Point3d, Vector3d } from \"./Point3dVector3d\";\r\nimport { XYAndZ } from \"./XYZProps\";\r\n\r\n/**\r\n * Helper object to access members of a Point3d[] in geometric calculations.\r\n * * The collection holds only a reference to the actual array.\r\n * * The actual array may be replaced by the user as needed.\r\n * * When replaced, there is no cached data to be updated.\r\n * @public\r\n */\r\nexport class Point3dArrayCarrier extends IndexedReadWriteXYZCollection {\r\n /** Reference to array being queried. */\r\n public data: Point3d[];\r\n /** CAPTURE caller supplied array ... */\r\n public constructor(data: Point3d[]) {\r\n super();\r\n this.data = data;\r\n }\r\n /** Test if `index` is a valid index into the array. */\r\n public isValidIndex(index: number): boolean {\r\n return index >= 0 && index < this.data.length;\r\n }\r\n /**\r\n * Access by index, returning strongly typed Point3d\r\n * * This returns the xyz value but NOT reference to the point in the \"carried\" array.\r\n * @param index index of point within the array\r\n * @param result caller-allocated destination\r\n * @returns undefined if the index is out of bounds\r\n */\r\n public getPoint3dAtCheckedPointIndex(index: number, result?: Point3d): Point3d | undefined {\r\n if (this.isValidIndex(index)) {\r\n const source = this.data[index];\r\n return Point3d.create(source.x, source.y, source.z, result);\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Access by index, returning strongly typed Point3d\r\n * * This returns the xyz value but NOT reference to the point in the \"carried\" array.\r\n * @param index index of point within the array\r\n * @param result caller-allocated destination\r\n */\r\n public getPoint3dAtUncheckedPointIndex(index: number, result?: Point3d): Point3d {\r\n const source = this.data[index];\r\n return Point3d.create(source.x, source.y, source.z, result);\r\n }\r\n /**\r\n * Access by index, returning strongly typed Vector3d\r\n * @param index index of point within the array\r\n * @param result caller-allocated destination\r\n * @returns undefined if the index is out of bounds\r\n */\r\n public getVector3dAtCheckedVectorIndex(index: number, result?: Vector3d): Vector3d | undefined {\r\n if (this.isValidIndex(index)) {\r\n const source = this.data[index];\r\n return Vector3d.create(source.x, source.y, source.z, result);\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Access x of indexed point\r\n * * WARNING: make sure `pointIndex` is a valid index, otherwise, you get random results\r\n */\r\n public getXAtUncheckedPointIndex(pointIndex: number): number {\r\n return this.data[pointIndex].x;\r\n }\r\n /**\r\n * Access y of indexed point\r\n * * WARNING: make sure `pointIndex` is a valid index, otherwise, you get random results\r\n */\r\n public getYAtUncheckedPointIndex(pointIndex: number): number {\r\n return this.data[pointIndex].y;\r\n }\r\n /**\r\n * Access z of indexed point\r\n * * WARNING: make sure `pointIndex` is a valid index, otherwise, you get random results\r\n */\r\n public getZAtUncheckedPointIndex(pointIndex: number): number {\r\n return this.data[pointIndex].z;\r\n }\r\n /**\r\n * Return a vector from the point at indexA to the point at indexB\r\n * @param indexA index of point within the array\r\n * @param indexB index of point within the array\r\n * @param result caller-allocated vector.\r\n * @returns undefined if either index is out of bounds\r\n */\r\n public vectorIndexIndex(indexA: number, indexB: number, result?: Vector3d): Vector3d | undefined {\r\n if (this.isValidIndex(indexA) && this.isValidIndex(indexB))\r\n return Vector3d.createStartEnd(this.data[indexA], this.data[indexB], result);\r\n return undefined;\r\n }\r\n /**\r\n * Return a vector from given origin to point at indexB\r\n * @param origin origin for vector\r\n * @param indexB index of point within the array\r\n * @param result caller-allocated vector.\r\n * @returns undefined if index is out of bounds\r\n */\r\n public vectorXYAndZIndex(origin: XYAndZ, indexB: number, result?: Vector3d): Vector3d | undefined {\r\n if (this.isValidIndex(indexB))\r\n return Vector3d.createStartEnd(origin, this.data[indexB], result);\r\n return undefined;\r\n }\r\n /**\r\n * Return the cross product of vectors from origin to points at indexA and indexB\r\n * @param origin origin for vector\r\n * @param indexA index of first target within the array\r\n * @param indexB index of second target within the array\r\n * @param result caller-allocated vector.\r\n * @returns undefined if either index is out of bounds\r\n */\r\n public crossProductXYAndZIndexIndex(\r\n origin: XYAndZ, indexA: number, indexB: number, result?: Vector3d,\r\n ): Vector3d | undefined {\r\n if (this.isValidIndex(indexA) && this.isValidIndex(indexB))\r\n return Vector3d.createCrossProductToPoints(origin, this.data[indexA], this.data[indexB], result);\r\n return undefined;\r\n }\r\n /**\r\n * Return the cross product of vectors from point at originIndex to points at indexA and indexB\r\n * @param originIndex index of origin\r\n * @param indexA index of first target within the array\r\n * @param indexB index of second target within the array\r\n * @param result caller-allocated vector.\r\n * @returns return true if indexA, indexB both valid\r\n */\r\n public crossProductIndexIndexIndex(\r\n originIndex: number, indexA: number, indexB: number, result?: Vector3d,\r\n ): Vector3d | undefined {\r\n if (this.isValidIndex(originIndex) && this.isValidIndex(indexA) && this.isValidIndex(indexB))\r\n return Vector3d.createCrossProductToPoints(this.data[originIndex], this.data[indexA], this.data[indexB], result);\r\n return undefined;\r\n }\r\n /**\r\n * Compute the cross product of vectors from point at originIndex to points at indexA and indexB, and accumulate it to the result.\r\n * @param origin index of origin\r\n * @param indexA index of first target within the array\r\n * @param indexB index of second target within the array\r\n * @param result caller-allocated vector.\r\n * @returns return true if indexA, indexB both valid\r\n */\r\n public accumulateCrossProductIndexIndexIndex(originIndex: number, indexA: number, indexB: number, result: Vector3d): void {\r\n const data = this.data;\r\n if (this.isValidIndex(originIndex) && this.isValidIndex(indexA) && this.isValidIndex(indexB))\r\n result.addCrossProductToTargetsInPlace(\r\n data[originIndex].x, data[originIndex].y, data[originIndex].z,\r\n data[indexA].x, data[indexA].y, data[indexA].z,\r\n data[indexB].x, data[indexB].y, data[indexB].z,\r\n );\r\n }\r\n /** Accumulate scale times the x,y,z values at index to the sum. No action if index is out of bounds */\r\n public accumulateScaledXYZ(index: number, scale: number, sum: Point3d): void {\r\n if (this.isValidIndex(index)) {\r\n const point = this.data[index];\r\n sum.x += scale * point.x;\r\n sum.y += scale * point.y;\r\n sum.z += scale * point.z;\r\n }\r\n }\r\n /** Read-only property for number of XYZ in the collection */\r\n public get length(): number {\r\n return this.data.length;\r\n }\r\n /**\r\n * Push a (clone of) point onto the collection\r\n * * point itself is not pushed -- xyz data is extracted into the native form of the collection.\r\n */\r\n public push(data: Point3d): void {\r\n this.data.push(data.clone());\r\n }\r\n /**\r\n * Push a new point (given by coordinates) onto the collection\r\n * @param x x coordinate\r\n * @param y y coordinate\r\n * @param z z coordinate\r\n */\r\n public pushXYZ(x?: number, y?: number, z?: number): void {\r\n this.data.push(\r\n Point3d.create(x === undefined ? 0.0 : x, y === undefined ? 0.0 : y, z === undefined ? 0.0 : z),\r\n );\r\n }\r\n /** Extract (copy) the final point */\r\n public override back(result?: Point3d): Point3d | undefined {\r\n if (this.data.length > 0) {\r\n return this.data[this.data.length - 1].clone(result);\r\n }\r\n return undefined;\r\n }\r\n /** Extract (copy) the first point */\r\n public override front(result?: Point3d): Point3d | undefined {\r\n if (this.data.length > 0) {\r\n return this.data[0].clone(result);\r\n }\r\n return undefined;\r\n }\r\n /** Remove the final point. */\r\n public pop(): void {\r\n if (this.data.length > 0)\r\n this.data.pop();\r\n }\r\n /** Remove all points. */\r\n public clear(): void {\r\n this.data.length = 0;\r\n }\r\n /** Reverse the points in place */\r\n public reverseInPlace(): void {\r\n this.data.reverse();\r\n }\r\n /**\r\n * Return distance squared between indicated points.\r\n * @param index0 first point index\r\n * @param index1 second point index\r\n */\r\n public distanceSquaredIndexIndex(index0: number, index1: number): number | undefined {\r\n const n = this.data.length;\r\n if (index0 >= 0 && index0 < n && index1 >= 0 && index1 < n) {\r\n return this.data[index0].distanceSquared(this.data[index1]);\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Return distance between indicated points.\r\n * @param index0 first point index\r\n * @param index1 second point index\r\n */\r\n public distanceIndexIndex(index0: number, index1: number): number | undefined {\r\n const n = this.data.length;\r\n if (index0 >= 0 && index0 < n && index1 >= 0 && index1 < n) {\r\n return this.data[index0].distance(this.data[index1]);\r\n }\r\n return undefined;\r\n }\r\n /** Adjust index into range by modulo with the length. */\r\n public override cyclicIndex(i: number): number {\r\n return (i % this.data.length);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Point3dArrayCarrier.js","sourceRoot":"","sources":["../../../src/geometry3d/Point3dArrayCarrier.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,iEAAuE;AACvE,uDAAsD;AAGtD;;;;;;GAMG;AACH,MAAa,mBAAoB,SAAQ,oDAA6B;IAGpE,wCAAwC;IACxC,YAAmB,IAAe;QAChC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IACD,uDAAuD;IAChD,YAAY,CAAC,KAAa;QAC/B,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IACl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AChC,CAAC;CACF;AAnOD,kDAmOC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ArraysAndInterfaces\r\n */\r\n\r\nimport { IndexedReadWriteXYZCollection } from \"./IndexedXYZCollection\";\r\nimport { Point3d, Vector3d } from \"./Point3dVector3d\";\r\nimport { XYAndZ } from \"./XYZProps\";\r\n\r\n/**\r\n * Helper object to access members of a Point3d[] in geometric calculations.\r\n * * The collection holds only a reference to the actual array.\r\n * * The actual array may be replaced by the user as needed.\r\n * * When replaced, there is no cached data to be updated.\r\n * @public\r\n */\r\nexport class Point3dArrayCarrier extends IndexedReadWriteXYZCollection {\r\n /** Reference to array being queried. */\r\n public data: Point3d[];\r\n /** CAPTURE caller supplied array ... */\r\n public constructor(data: Point3d[]) {\r\n super();\r\n this.data = data;\r\n }\r\n /** Test if `index` is a valid index into the array. */\r\n public isValidIndex(index: number): boolean {\r\n return this.isIndexValid(index);\r\n }\r\n /**\r\n * Access by index, returning strongly typed Point3d\r\n * * This returns the xyz value but NOT reference to the point in the \"carried\" array.\r\n * @param index index of point within the array\r\n * @param result caller-allocated destination\r\n * @returns undefined if the index is out of bounds\r\n */\r\n public getPoint3dAtCheckedPointIndex(index: number, result?: Point3d): Point3d | undefined {\r\n if (this.isValidIndex(index)) {\r\n const source = this.data[index];\r\n return Point3d.create(source.x, source.y, source.z, result);\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Access by index, returning strongly typed Point3d\r\n * * This returns the xyz value but NOT reference to the point in the \"carried\" array.\r\n * @param index index of point within the array\r\n * @param result caller-allocated destination\r\n */\r\n public getPoint3dAtUncheckedPointIndex(index: number, result?: Point3d): Point3d {\r\n const source = this.data[index];\r\n return Point3d.create(source.x, source.y, source.z, result);\r\n }\r\n /**\r\n * Access by index, returning strongly typed Vector3d\r\n * @param index index of point within the array\r\n * @param result caller-allocated destination\r\n * @returns undefined if the index is out of bounds\r\n */\r\n public getVector3dAtCheckedVectorIndex(index: number, result?: Vector3d): Vector3d | undefined {\r\n if (this.isValidIndex(index)) {\r\n const source = this.data[index];\r\n return Vector3d.create(source.x, source.y, source.z, result);\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Access x of indexed point\r\n * * WARNING: make sure `pointIndex` is a valid index, otherwise, you get random results\r\n */\r\n public getXAtUncheckedPointIndex(pointIndex: number): number {\r\n return this.data[pointIndex].x;\r\n }\r\n /**\r\n * Access y of indexed point\r\n * * WARNING: make sure `pointIndex` is a valid index, otherwise, you get random results\r\n */\r\n public getYAtUncheckedPointIndex(pointIndex: number): number {\r\n return this.data[pointIndex].y;\r\n }\r\n /**\r\n * Access z of indexed point\r\n * * WARNING: make sure `pointIndex` is a valid index, otherwise, you get random results\r\n */\r\n public getZAtUncheckedPointIndex(pointIndex: number): number {\r\n return this.data[pointIndex].z;\r\n }\r\n /**\r\n * Return a vector from the point at indexA to the point at indexB\r\n * @param indexA index of point within the array\r\n * @param indexB index of point within the array\r\n * @param result caller-allocated vector.\r\n * @returns undefined if either index is out of bounds\r\n */\r\n public vectorIndexIndex(indexA: number, indexB: number, result?: Vector3d): Vector3d | undefined {\r\n if (this.isValidIndex(indexA) && this.isValidIndex(indexB))\r\n return Vector3d.createStartEnd(this.data[indexA], this.data[indexB], result);\r\n return undefined;\r\n }\r\n /**\r\n * Return a vector from given origin to point at indexB\r\n * @param origin origin for vector\r\n * @param indexB index of point within the array\r\n * @param result caller-allocated vector.\r\n * @returns undefined if index is out of bounds\r\n */\r\n public vectorXYAndZIndex(origin: XYAndZ, indexB: number, result?: Vector3d): Vector3d | undefined {\r\n if (this.isValidIndex(indexB))\r\n return Vector3d.createStartEnd(origin, this.data[indexB], result);\r\n return undefined;\r\n }\r\n /**\r\n * Return the cross product of vectors from origin to points at indexA and indexB\r\n * @param origin origin for vector\r\n * @param indexA index of first target within the array\r\n * @param indexB index of second target within the array\r\n * @param result caller-allocated vector.\r\n * @returns undefined if either index is out of bounds\r\n */\r\n public crossProductXYAndZIndexIndex(\r\n origin: XYAndZ, indexA: number, indexB: number, result?: Vector3d,\r\n ): Vector3d | undefined {\r\n if (this.isValidIndex(indexA) && this.isValidIndex(indexB))\r\n return Vector3d.createCrossProductToPoints(origin, this.data[indexA], this.data[indexB], result);\r\n return undefined;\r\n }\r\n /**\r\n * Return the cross product of vectors from point at originIndex to points at indexA and indexB\r\n * @param originIndex index of origin\r\n * @param indexA index of first target within the array\r\n * @param indexB index of second target within the array\r\n * @param result caller-allocated vector.\r\n * @returns return true if indexA, indexB both valid\r\n */\r\n public crossProductIndexIndexIndex(\r\n originIndex: number, indexA: number, indexB: number, result?: Vector3d,\r\n ): Vector3d | undefined {\r\n if (this.isValidIndex(originIndex) && this.isValidIndex(indexA) && this.isValidIndex(indexB))\r\n return Vector3d.createCrossProductToPoints(this.data[originIndex], this.data[indexA], this.data[indexB], result);\r\n return undefined;\r\n }\r\n /**\r\n * Compute the cross product of vectors from point at originIndex to points at indexA and indexB, and accumulate it to the result.\r\n * @param origin index of origin\r\n * @param indexA index of first target within the array\r\n * @param indexB index of second target within the array\r\n * @param result caller-allocated vector.\r\n * @returns return true if indexA, indexB both valid\r\n */\r\n public accumulateCrossProductIndexIndexIndex(originIndex: number, indexA: number, indexB: number, result: Vector3d): void {\r\n const data = this.data;\r\n if (this.isValidIndex(originIndex) && this.isValidIndex(indexA) && this.isValidIndex(indexB))\r\n result.addCrossProductToTargetsInPlace(\r\n data[originIndex].x, data[originIndex].y, data[originIndex].z,\r\n data[indexA].x, data[indexA].y, data[indexA].z,\r\n data[indexB].x, data[indexB].y, data[indexB].z,\r\n );\r\n }\r\n /** Accumulate scale times the x,y,z values at index to the sum. No action if index is out of bounds */\r\n public accumulateScaledXYZ(index: number, scale: number, sum: Point3d): void {\r\n if (this.isValidIndex(index)) {\r\n const point = this.data[index];\r\n sum.x += scale * point.x;\r\n sum.y += scale * point.y;\r\n sum.z += scale * point.z;\r\n }\r\n }\r\n /** Read-only property for number of XYZ in the collection */\r\n public get length(): number {\r\n return this.data.length;\r\n }\r\n /**\r\n * Push a (clone of) point onto the collection\r\n * * point itself is not pushed -- xyz data is extracted into the native form of the collection.\r\n */\r\n public push(data: Point3d): void {\r\n this.data.push(data.clone());\r\n }\r\n /**\r\n * Push a new point (given by coordinates) onto the collection\r\n * @param x x coordinate\r\n * @param y y coordinate\r\n * @param z z coordinate\r\n */\r\n public pushXYZ(x?: number, y?: number, z?: number): void {\r\n this.data.push(\r\n Point3d.create(x === undefined ? 0.0 : x, y === undefined ? 0.0 : y, z === undefined ? 0.0 : z),\r\n );\r\n }\r\n /** Extract (copy) the final point */\r\n public override back(result?: Point3d): Point3d | undefined {\r\n if (this.data.length > 0) {\r\n return this.data[this.data.length - 1].clone(result);\r\n }\r\n return undefined;\r\n }\r\n /** Extract (copy) the first point */\r\n public override front(result?: Point3d): Point3d | undefined {\r\n if (this.data.length > 0) {\r\n return this.data[0].clone(result);\r\n }\r\n return undefined;\r\n }\r\n /** Remove the final point. */\r\n public pop(): void {\r\n if (this.data.length > 0)\r\n this.data.pop();\r\n }\r\n /** Remove all points. */\r\n public clear(): void {\r\n this.data.length = 0;\r\n }\r\n /** Reverse the points in place */\r\n public reverseInPlace(): void {\r\n this.data.reverse();\r\n }\r\n /**\r\n * Return distance squared between indicated points.\r\n * @param index0 first point index\r\n * @param index1 second point index\r\n */\r\n public distanceSquaredIndexIndex(index0: number, index1: number): number | undefined {\r\n const n = this.data.length;\r\n if (index0 >= 0 && index0 < n && index1 >= 0 && index1 < n) {\r\n return this.data[index0].distanceSquared(this.data[index1]);\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Return distance between indicated points.\r\n * @param index0 first point index\r\n * @param index1 second point index\r\n */\r\n public distanceIndexIndex(index0: number, index1: number): number | undefined {\r\n const n = this.data.length;\r\n if (index0 >= 0 && index0 < n && index1 >= 0 && index1 < n) {\r\n return this.data[index0].distance(this.data[index1]);\r\n }\r\n return undefined;\r\n }\r\n /** Adjust index into range by modulo with the length. */\r\n public override cyclicIndex(i: number): number {\r\n return (i % this.data.length);\r\n }\r\n}\r\n"]}
@@ -524,10 +524,10 @@ export declare class Vector3d extends XYZ {
524
524
  */
525
525
  rotate90Around(axis: Vector3d, result?: Vector3d): Vector3d | undefined;
526
526
  /**
527
- * Return a vector computed at fractional position between this vector and vectorB
528
- * @param fraction fractional position. 0 is at `this`. 1 is at `vectorB`.
529
- * True fractions are "between", negatives are "before this", beyond 1 is "beyond vectorB".
530
- * @param vectorB second vector
527
+ * Return a vector computed at fractional position between this vector and vectorB.
528
+ * @param fraction fractional position. 0 is at `this`. 1 is at `vectorB`. True fractions are "between",
529
+ * negatives are "before this", beyond 1 is "beyond vectorB".
530
+ * @param vectorB second vector.
531
531
  * @param result optional preallocated result.
532
532
  */
533
533
  interpolate(fraction: number, vectorB: XYAndZ, result?: Vector3d): Vector3d;
@@ -781,8 +781,8 @@ export declare class Vector3d extends XYZ {
781
781
  * * The input tolerances in `options`, if given, are considered to be squared for efficiency's sake,
782
782
  * so if you have a distance or angle tolerance t, you should pass in t * t.
783
783
  * @param other second vector in comparison
784
- * @param oppositeIsParallel whether to consider diametrically opposed vectors as parallel
785
- * @param returnValueIfAnInputIsZeroLength if either vector is near zero length, return this value.
784
+ * @param oppositeIsParallel whether to consider diametrically opposed vectors as parallel. Default false.
785
+ * @param returnValueIfAnInputIsZeroLength if either vector is near zero length, return this value. Default false.
786
786
  * @param options optional radian and distance tolerances.
787
787
  */
788
788
  isParallelTo(other: Vector3d, oppositeIsParallel?: boolean, returnValueIfAnInputIsZeroLength?: boolean, options?: PerpParallelOptions): boolean;
@@ -1038,10 +1038,10 @@ class Vector3d extends XYZ {
1038
1038
  return unitNormal ? unitNormal.crossProduct(this).plusScaled(unitNormal, unitNormal.dotProduct(this), result) : undefined;
1039
1039
  }
1040
1040
  /**
1041
- * Return a vector computed at fractional position between this vector and vectorB
1042
- * @param fraction fractional position. 0 is at `this`. 1 is at `vectorB`.
1043
- * True fractions are "between", negatives are "before this", beyond 1 is "beyond vectorB".
1044
- * @param vectorB second vector
1041
+ * Return a vector computed at fractional position between this vector and vectorB.
1042
+ * @param fraction fractional position. 0 is at `this`. 1 is at `vectorB`. True fractions are "between",
1043
+ * negatives are "before this", beyond 1 is "beyond vectorB".
1044
+ * @param vectorB second vector.
1045
1045
  * @param result optional preallocated result.
1046
1046
  */
1047
1047
  interpolate(fraction, vectorB, result) {
@@ -1481,8 +1481,8 @@ class Vector3d extends XYZ {
1481
1481
  * * The input tolerances in `options`, if given, are considered to be squared for efficiency's sake,
1482
1482
  * so if you have a distance or angle tolerance t, you should pass in t * t.
1483
1483
  * @param other second vector in comparison
1484
- * @param oppositeIsParallel whether to consider diametrically opposed vectors as parallel
1485
- * @param returnValueIfAnInputIsZeroLength if either vector is near zero length, return this value.
1484
+ * @param oppositeIsParallel whether to consider diametrically opposed vectors as parallel. Default false.
1485
+ * @param returnValueIfAnInputIsZeroLength if either vector is near zero length, return this value. Default false.
1486
1486
  * @param options optional radian and distance tolerances.
1487
1487
  */
1488
1488
  isParallelTo(other, oppositeIsParallel = false, returnValueIfAnInputIsZeroLength = false, options) {