@itwin/core-geometry 4.10.0-dev.4 → 4.10.0-dev.6
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.
- package/lib/cjs/Constant.js.map +1 -1
- package/lib/cjs/Geometry.d.ts +2 -2
- package/lib/cjs/Geometry.js +2 -2
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/bspline/AkimaCurve3d.js.map +1 -1
- package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurve3dH.js.map +1 -1
- package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
- package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
- package/lib/cjs/bspline/Bezier1dNd.js.map +1 -1
- package/lib/cjs/bspline/BezierCurve3d.js.map +1 -1
- package/lib/cjs/bspline/BezierCurve3dH.js.map +1 -1
- package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
- package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
- package/lib/cjs/bspline/KnotVector.js.map +1 -1
- package/lib/cjs/bspline/SurfaceLocationDetail.js.map +1 -1
- package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/cjs/clipping/BooleanClipFactory.js.map +1 -1
- package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
- package/lib/cjs/clipping/ClipPlane.js.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.d.ts +7 -7
- package/lib/cjs/clipping/ClipPrimitive.d.ts.map +1 -1
- package/lib/cjs/clipping/ClipPrimitive.js +1 -1
- package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
- package/lib/cjs/clipping/ClipUtils.js.map +1 -1
- package/lib/cjs/clipping/ClipVector.js.map +1 -1
- package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/cjs/core-geometry.js.map +1 -1
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/ConstructCurveBetweenCurves.js.map +1 -1
- package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +27 -8
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js +44 -25
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveCollection.js.map +1 -1
- package/lib/cjs/curve/CurveCurve.js.map +1 -1
- package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
- package/lib/cjs/curve/CurveOps.js.map +1 -1
- package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
- package/lib/cjs/curve/CurveProcessor.js.map +1 -1
- package/lib/cjs/curve/CurveTypes.js.map +1 -1
- package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
- package/lib/cjs/curve/GeometryQuery.js.map +1 -1
- package/lib/cjs/curve/LineSegment3d.js.map +1 -1
- package/lib/cjs/curve/LineString3d.js.map +1 -1
- package/lib/cjs/curve/Loop.js.map +1 -1
- package/lib/cjs/curve/OffsetOptions.js.map +1 -1
- package/lib/cjs/curve/ParityRegion.js.map +1 -1
- package/lib/cjs/curve/Path.js.map +1 -1
- package/lib/cjs/curve/PointString3d.js.map +1 -1
- package/lib/cjs/curve/ProxyCurve.js.map +1 -1
- package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/cjs/curve/Query/CurveSplitContext.js.map +1 -1
- package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/cjs/curve/Query/InOutTests.js.map +1 -1
- package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/cjs/curve/Query/StrokeCountMap.js.map +1 -1
- package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
- package/lib/cjs/curve/RegionOps.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/curve/StrokeOptions.js.map +1 -1
- package/lib/cjs/curve/UnionRegion.js.map +1 -1
- package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/ChainCollectorContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CloneCurvesContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
- package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts +1 -0
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +30 -56
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.d.ts +22 -7
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.d.ts.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js +127 -67
- package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveLengthContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/GapSearchContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
- package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/SumLengthsContext.js.map +1 -1
- package/lib/cjs/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
- package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/ClothoidSeries.js.map +1 -1
- package/lib/cjs/curve/spiral/CubicEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/NormalizedTransition.js.map +1 -1
- package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/TransitionConditionalProperties.js.map +1 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
- package/lib/cjs/geometry3d/Angle.d.ts +5 -5
- package/lib/cjs/geometry3d/Angle.js +5 -5
- package/lib/cjs/geometry3d/Angle.js.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.d.ts +91 -7
- package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/cjs/geometry3d/AngleSweep.js +141 -45
- package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
- package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
- package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/cjs/geometry3d/FrustumAnimation.js.map +1 -1
- package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedCollectionInterval.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/cjs/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.d.ts +7 -14
- package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Matrix3d.js +19 -14
- package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
- package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
- package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
- package/lib/cjs/geometry3d/Range.js.map +1 -1
- package/lib/cjs/geometry3d/Ray2d.js.map +1 -1
- package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
- package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
- package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
- package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/cjs/geometry3d/Transform.d.ts +4 -2
- package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Transform.js +4 -2
- package/lib/cjs/geometry3d/Transform.js.map +1 -1
- package/lib/cjs/geometry3d/UVSurfaceOps.js.map +1 -1
- package/lib/cjs/geometry3d/XYZProps.js.map +1 -1
- package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/cjs/geometry4d/Map4d.js.map +1 -1
- package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
- package/lib/cjs/geometry4d/MomentData.js.map +1 -1
- package/lib/cjs/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
- package/lib/cjs/geometry4d/Point4d.js.map +1 -1
- package/lib/cjs/numerics/BandedSystem.js.map +1 -1
- package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
- package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
- package/lib/cjs/numerics/Complex.js.map +1 -1
- package/lib/cjs/numerics/ConvexPolygon2d.js.map +1 -1
- package/lib/cjs/numerics/Newton.js.map +1 -1
- package/lib/cjs/numerics/PascalCoefficients.js.map +1 -1
- package/lib/cjs/numerics/PolarData.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/cjs/numerics/Quadrature.js.map +1 -1
- package/lib/cjs/numerics/Range1dArray.js.map +1 -1
- package/lib/cjs/numerics/TriDiagonalSystem.js.map +1 -1
- package/lib/cjs/numerics/UnionFind.js.map +1 -1
- package/lib/cjs/numerics/UsageSums.js.map +1 -1
- package/lib/cjs/polyface/AuxData.js.map +1 -1
- package/lib/cjs/polyface/BoxTopology.js.map +1 -1
- package/lib/cjs/polyface/FacetFaceData.js.map +1 -1
- package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -1
- package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
- package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
- package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/cjs/polyface/Polyface.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/polyface/RangeLengthData.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/MinimumValueTester.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -1
- package/lib/cjs/polyface/TaggedNumericData.js.map +1 -1
- package/lib/cjs/polyface/TriangleCandidate.js.map +1 -1
- package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
- package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
- package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
- package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
- package/lib/cjs/polyface/multiclip/RangeSearch.js.map +1 -1
- package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/cjs/polyface/multiclip/XYPointBuckets.js.map +1 -1
- package/lib/cjs/serialization/BGFBAccessors.js.map +1 -1
- package/lib/cjs/serialization/BGFBReader.js.map +1 -1
- package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
- package/lib/cjs/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
- package/lib/cjs/serialization/DeepCompare.js.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
- package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/cjs/serialization/SerializationHelpers.js.map +1 -1
- package/lib/cjs/solid/Box.js.map +1 -1
- package/lib/cjs/solid/Cone.js.map +1 -1
- package/lib/cjs/solid/LinearSweep.js.map +1 -1
- package/lib/cjs/solid/RotationalSweep.js.map +1 -1
- package/lib/cjs/solid/RuledSweep.js.map +1 -1
- package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
- package/lib/cjs/solid/Sphere.js.map +1 -1
- package/lib/cjs/solid/SweepContour.js.map +1 -1
- package/lib/cjs/solid/TorusPipe.js.map +1 -1
- package/lib/cjs/topology/ChainMerge.js.map +1 -1
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphValidation.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeMarkSet.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeNodeXYZUV.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePointInGraphSearch.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePositionDetail.js.map +1 -1
- package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
- package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/cjs/topology/MaskManager.js.map +1 -1
- package/lib/cjs/topology/Merging.js.map +1 -1
- package/lib/cjs/topology/RegularizeFace.js.map +1 -1
- package/lib/cjs/topology/SignedDataSummary.js.map +1 -1
- package/lib/cjs/topology/SpaceTriangulation.js.map +1 -1
- package/lib/cjs/topology/Triangulation.js.map +1 -1
- package/lib/cjs/topology/XYParitySearchContext.js.map +1 -1
- package/lib/esm/Constant.js.map +1 -1
- package/lib/esm/Geometry.d.ts +2 -2
- package/lib/esm/Geometry.js +2 -2
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/bspline/AkimaCurve3d.js.map +1 -1
- package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
- package/lib/esm/bspline/BSplineCurve.js.map +1 -1
- package/lib/esm/bspline/BSplineCurve3dH.js.map +1 -1
- package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
- package/lib/esm/bspline/BSplineSurface.js.map +1 -1
- package/lib/esm/bspline/Bezier1dNd.js.map +1 -1
- package/lib/esm/bspline/BezierCurve3d.js.map +1 -1
- package/lib/esm/bspline/BezierCurve3dH.js.map +1 -1
- package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
- package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
- package/lib/esm/bspline/KnotVector.js.map +1 -1
- package/lib/esm/bspline/SurfaceLocationDetail.js.map +1 -1
- package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
- package/lib/esm/clipping/BooleanClipFactory.js.map +1 -1
- package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
- package/lib/esm/clipping/ClipPlane.js.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.d.ts +7 -7
- package/lib/esm/clipping/ClipPrimitive.d.ts.map +1 -1
- package/lib/esm/clipping/ClipPrimitive.js +1 -1
- package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
- package/lib/esm/clipping/ClipUtils.js.map +1 -1
- package/lib/esm/clipping/ClipVector.js.map +1 -1
- package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
- package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
- package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
- package/lib/esm/core-geometry.js.map +1 -1
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/ConstructCurveBetweenCurves.js.map +1 -1
- package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +27 -8
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.js +44 -25
- package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveCollection.js.map +1 -1
- package/lib/esm/curve/CurveCurve.js.map +1 -1
- package/lib/esm/curve/CurveExtendMode.js.map +1 -1
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
- package/lib/esm/curve/CurveOps.js.map +1 -1
- package/lib/esm/curve/CurvePrimitive.js.map +1 -1
- package/lib/esm/curve/CurveProcessor.js.map +1 -1
- package/lib/esm/curve/CurveTypes.js.map +1 -1
- package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
- package/lib/esm/curve/GeometryQuery.js.map +1 -1
- package/lib/esm/curve/LineSegment3d.js.map +1 -1
- package/lib/esm/curve/LineString3d.js.map +1 -1
- package/lib/esm/curve/Loop.js.map +1 -1
- package/lib/esm/curve/OffsetOptions.js.map +1 -1
- package/lib/esm/curve/ParityRegion.js.map +1 -1
- package/lib/esm/curve/Path.js.map +1 -1
- package/lib/esm/curve/PointString3d.js.map +1 -1
- package/lib/esm/curve/ProxyCurve.js.map +1 -1
- package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
- package/lib/esm/curve/Query/CurveSplitContext.js.map +1 -1
- package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
- package/lib/esm/curve/Query/InOutTests.js.map +1 -1
- package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
- package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
- package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
- package/lib/esm/curve/RegionOps.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/curve/StrokeOptions.js.map +1 -1
- package/lib/esm/curve/UnionRegion.js.map +1 -1
- package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/ChainCollectorContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/CloneCurvesContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
- package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts +1 -0
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +30 -56
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.d.ts +22 -7
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.d.ts.map +1 -1
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js +127 -67
- package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveLengthContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/GapSearchContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
- package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
- package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/SumLengthsContext.js.map +1 -1
- package/lib/esm/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
- package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/ClothoidSeries.js.map +1 -1
- package/lib/esm/curve/spiral/CubicEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/NormalizedTransition.js.map +1 -1
- package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/TransitionConditionalProperties.js.map +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
- package/lib/esm/geometry3d/Angle.d.ts +5 -5
- package/lib/esm/geometry3d/Angle.js +5 -5
- package/lib/esm/geometry3d/Angle.js.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.d.ts +91 -7
- package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
- package/lib/esm/geometry3d/AngleSweep.js +141 -45
- package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
- package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
- package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
- package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
- package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
- package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
- package/lib/esm/geometry3d/FrustumAnimation.js.map +1 -1
- package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
- package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/esm/geometry3d/IndexedCollectionInterval.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/esm/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.d.ts +7 -14
- package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
- package/lib/esm/geometry3d/Matrix3d.js +19 -14
- package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
- package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
- package/lib/esm/geometry3d/Plane3d.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
- package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
- package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
- package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
- package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
- package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
- package/lib/esm/geometry3d/Range.js.map +1 -1
- package/lib/esm/geometry3d/Ray2d.js.map +1 -1
- package/lib/esm/geometry3d/Ray3d.js.map +1 -1
- package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
- package/lib/esm/geometry3d/Segment1d.js.map +1 -1
- package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
- package/lib/esm/geometry3d/Transform.d.ts +4 -2
- package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
- package/lib/esm/geometry3d/Transform.js +4 -2
- package/lib/esm/geometry3d/Transform.js.map +1 -1
- package/lib/esm/geometry3d/UVSurfaceOps.js.map +1 -1
- package/lib/esm/geometry3d/XYZProps.js.map +1 -1
- package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/esm/geometry4d/Map4d.js.map +1 -1
- package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
- package/lib/esm/geometry4d/MomentData.js.map +1 -1
- package/lib/esm/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
- package/lib/esm/geometry4d/Point4d.js.map +1 -1
- package/lib/esm/numerics/BandedSystem.js.map +1 -1
- package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
- package/lib/esm/numerics/ClusterableArray.js.map +1 -1
- package/lib/esm/numerics/Complex.js.map +1 -1
- package/lib/esm/numerics/ConvexPolygon2d.js.map +1 -1
- package/lib/esm/numerics/Newton.js.map +1 -1
- package/lib/esm/numerics/PascalCoefficients.js.map +1 -1
- package/lib/esm/numerics/PolarData.js.map +1 -1
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/lib/esm/numerics/Quadrature.js.map +1 -1
- package/lib/esm/numerics/Range1dArray.js.map +1 -1
- package/lib/esm/numerics/TriDiagonalSystem.js.map +1 -1
- package/lib/esm/numerics/UnionFind.js.map +1 -1
- package/lib/esm/numerics/UsageSums.js.map +1 -1
- package/lib/esm/polyface/AuxData.js.map +1 -1
- package/lib/esm/polyface/BoxTopology.js.map +1 -1
- package/lib/esm/polyface/FacetFaceData.js.map +1 -1
- package/lib/esm/polyface/FacetLocationDetail.js.map +1 -1
- package/lib/esm/polyface/FacetOrientation.js.map +1 -1
- package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
- package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
- package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
- package/lib/esm/polyface/Polyface.js.map +1 -1
- package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
- package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
- package/lib/esm/polyface/PolyfaceData.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/polyface/RangeLengthData.js.map +1 -1
- package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
- package/lib/esm/polyface/RangeTree/MinimumValueTester.js.map +1 -1
- package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
- package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
- package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -1
- package/lib/esm/polyface/TaggedNumericData.js.map +1 -1
- package/lib/esm/polyface/TriangleCandidate.js.map +1 -1
- package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
- package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
- package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
- package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
- package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -1
- package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
- package/lib/esm/polyface/multiclip/XYPointBuckets.js.map +1 -1
- package/lib/esm/serialization/BGFBAccessors.js.map +1 -1
- package/lib/esm/serialization/BGFBReader.js.map +1 -1
- package/lib/esm/serialization/BGFBWriter.js.map +1 -1
- package/lib/esm/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
- package/lib/esm/serialization/DeepCompare.js.map +1 -1
- package/lib/esm/serialization/GeometrySamples.js.map +1 -1
- package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
- package/lib/esm/serialization/SerializationHelpers.js.map +1 -1
- package/lib/esm/solid/Box.js.map +1 -1
- package/lib/esm/solid/Cone.js.map +1 -1
- package/lib/esm/solid/LinearSweep.js.map +1 -1
- package/lib/esm/solid/RotationalSweep.js.map +1 -1
- package/lib/esm/solid/RuledSweep.js.map +1 -1
- package/lib/esm/solid/SolidPrimitive.js.map +1 -1
- package/lib/esm/solid/Sphere.js.map +1 -1
- package/lib/esm/solid/SweepContour.js.map +1 -1
- package/lib/esm/solid/TorusPipe.js.map +1 -1
- package/lib/esm/topology/ChainMerge.js.map +1 -1
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphValidation.js.map +1 -1
- package/lib/esm/topology/HalfEdgeMarkSet.js.map +1 -1
- package/lib/esm/topology/HalfEdgeNodeXYZUV.js.map +1 -1
- package/lib/esm/topology/HalfEdgePointInGraphSearch.js.map +1 -1
- package/lib/esm/topology/HalfEdgePositionDetail.js.map +1 -1
- package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
- package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
- package/lib/esm/topology/MaskManager.js.map +1 -1
- package/lib/esm/topology/Merging.js.map +1 -1
- package/lib/esm/topology/RegularizeFace.js.map +1 -1
- package/lib/esm/topology/SignedDataSummary.js.map +1 -1
- package/lib/esm/topology/SpaceTriangulation.js.map +1 -1
- package/lib/esm/topology/Triangulation.js.map +1 -1
- package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
- package/package.json +3 -3
|
@@ -116,6 +116,7 @@ export declare class AngleSweep implements BeJSONFunctions {
|
|
|
116
116
|
/**
|
|
117
117
|
* Return 2PI divided by the sweep radians (i.e. 360 degrees divided by sweep angle).
|
|
118
118
|
* * This is the number of fractional intervals required to cover a whole circle.
|
|
119
|
+
* @returns period of the sweep, or 1 if sweep is empty.
|
|
119
120
|
*/
|
|
120
121
|
fractionPeriod(): number;
|
|
121
122
|
/**
|
|
@@ -129,39 +130,70 @@ export declare class AngleSweep implements BeJSONFunctions {
|
|
|
129
130
|
* * fraction larger than one for angles "before" the start angle if start > end
|
|
130
131
|
* * negative fraction for angles "after" the end angle if start > end
|
|
131
132
|
* * does not allow period shift
|
|
133
|
+
* @returns unbounded fraction, or 1 if sweep is empty.
|
|
132
134
|
*/
|
|
133
135
|
angleToUnboundedFraction(theta: Angle): number;
|
|
136
|
+
/**
|
|
137
|
+
* Convert a sweep fraction to the equivalent period-shifted fraction inside the sweep, or within one period of zero
|
|
138
|
+
* on the desired side.
|
|
139
|
+
* @param fraction fraction of the sweep.
|
|
140
|
+
* @param radians0 start angle of sweep (in radians).
|
|
141
|
+
* @param radians1 end angle of sweep (in radians).
|
|
142
|
+
* @param toNegativeFraction return an exterior fraction period-shifted to within one period of the start (true) or
|
|
143
|
+
* end (false) of the sweep.
|
|
144
|
+
* @returns period-shifted fraction. If `fraction` is already in [0,1], or the sweep is empty, then `fraction` is
|
|
145
|
+
* returned unchanged.
|
|
146
|
+
*/
|
|
147
|
+
static fractionToSignedPeriodicFractionStartEnd(fraction: number, radians0: number, radians1: number, toNegativeFraction: boolean): number;
|
|
148
|
+
/**
|
|
149
|
+
* Convert a sweep fraction to the equivalent period-shifted fraction inside this sweep, or within one period of
|
|
150
|
+
* zero on the desired side.
|
|
151
|
+
* @param fraction fraction of the sweep.
|
|
152
|
+
* @param toNegativeFraction return an exterior fraction period-shifted to within one period of the start (true) or
|
|
153
|
+
* end (false) of the sweep.
|
|
154
|
+
* @returns period-shifted fraction. If `fraction` is already in [0,1], or the sweep is empty, then `fraction` is
|
|
155
|
+
* returned unchanged.
|
|
156
|
+
*/
|
|
157
|
+
fractionToSignedPeriodicFraction(fraction: number, toNegativeFraction: boolean): number;
|
|
134
158
|
/**
|
|
135
159
|
* Return the fractionalized position of the given angle (as radians), computed with consideration of 2PI period.
|
|
136
160
|
* * consider radians0 as `start` angle of the sweep and radians1 as `end` angle of the sweep
|
|
137
|
-
* * fraction is always positive
|
|
138
161
|
* * the start angle is at fraction 0
|
|
139
162
|
* * the end angle is at fraction 1
|
|
140
163
|
* * interior angles are between 0 and 1
|
|
141
164
|
* * all exterior angles are at fractions greater than 1
|
|
142
165
|
* * allows period shift
|
|
166
|
+
* @param radians input angle (in radians)
|
|
167
|
+
* @param radians0 start angle of sweep (in radians)
|
|
168
|
+
* @param radians1 end angle of sweep (in radians)
|
|
169
|
+
* @param zeroSweepDefault return value when the sweep is empty (default 0)
|
|
170
|
+
* @returns nonnegative fraction, or `zeroSweepDefault` if the sweep is empty.
|
|
143
171
|
*/
|
|
144
172
|
static radiansToPositivePeriodicFractionStartEnd(radians: number, radians0: number, radians1: number, zeroSweepDefault?: number): number;
|
|
145
173
|
/**
|
|
146
174
|
* Return the fractionalized position of the given angle (as radians), computed with consideration of 2PI period.
|
|
147
|
-
* * fraction is always positive
|
|
148
175
|
* * the start angle is at fraction 0
|
|
149
176
|
* * the end angle is at fraction 1
|
|
150
177
|
* * interior angles are between 0 and 1
|
|
151
178
|
* * all exterior angles are at fractions greater than 1
|
|
152
179
|
* * allows period shift
|
|
180
|
+
* @param radians input angle (in radians)
|
|
181
|
+
* @param zeroSweepDefault return value when this sweep is empty (default 0)
|
|
182
|
+
* @returns nonnegative fraction, or `zeroSweepDefault` if the sweep is empty.
|
|
153
183
|
*/
|
|
154
184
|
radiansToPositivePeriodicFraction(radians: number, zeroSweepDefault?: number): number;
|
|
155
185
|
/**
|
|
156
186
|
* Return the fractionalized position of the given angle (as Angle), computed with consideration of 2PI period.
|
|
157
|
-
* * fraction is always positive
|
|
158
187
|
* * the start angle is at fraction 0
|
|
159
188
|
* * the end angle is at fraction 1
|
|
160
189
|
* * interior angles are between 0 and 1
|
|
161
190
|
* * all exterior angles are at fractions greater than 1
|
|
162
191
|
* * allows period shift
|
|
192
|
+
* @param theta input angle
|
|
193
|
+
* @param zeroSweepDefault return value when this sweep is empty (default 0)
|
|
194
|
+
* @returns nonnegative fraction, or `zeroSweepDefault` if the sweep is empty.
|
|
163
195
|
*/
|
|
164
|
-
angleToPositivePeriodicFraction(theta: Angle): number;
|
|
196
|
+
angleToPositivePeriodicFraction(theta: Angle, zeroSweepDefault?: number): number;
|
|
165
197
|
/**
|
|
166
198
|
* Return the fractionalized position of the given array of angles (as radian), computed with consideration of 2PI period.
|
|
167
199
|
* * fraction is always positive
|
|
@@ -181,8 +213,13 @@ export declare class AngleSweep implements BeJSONFunctions {
|
|
|
181
213
|
* * negative fraction for angles "before" the start angle
|
|
182
214
|
* * fraction larger than one for angles "after" the end angle
|
|
183
215
|
* * allows period shift
|
|
216
|
+
* @param radians input angle (in radians)
|
|
217
|
+
* @param radians0 start angle of sweep (in radians)
|
|
218
|
+
* @param radians1 end angle of sweep (in radians)
|
|
219
|
+
* @param zeroSweepDefault return value when the sweep is empty (default 0)
|
|
220
|
+
* @returns fraction, or `zeroSweepDefault` if the sweep is empty.
|
|
184
221
|
*/
|
|
185
|
-
static radiansToSignedPeriodicFractionStartEnd(radians: number, radians0: number, radians1: number): number;
|
|
222
|
+
static radiansToSignedPeriodicFractionStartEnd(radians: number, radians0: number, radians1: number, zeroSweepDefault?: number): number;
|
|
186
223
|
/**
|
|
187
224
|
* Return the fractionalized position of the given angle (as radians) computed with consideration of
|
|
188
225
|
* 2PI period and with consideration of angle sweep direction (CW or CCW).
|
|
@@ -192,8 +229,11 @@ export declare class AngleSweep implements BeJSONFunctions {
|
|
|
192
229
|
* * negative fraction for angles "before" the start angle
|
|
193
230
|
* * fraction larger than one for angles "after" the end angle
|
|
194
231
|
* * allows period shift
|
|
232
|
+
* @param radians input angle (in radians)
|
|
233
|
+
* @param zeroSweepDefault return value when this sweep is empty (default 0)
|
|
234
|
+
* @returns fraction, or `zeroSweepDefault` if this sweep is empty.
|
|
195
235
|
*/
|
|
196
|
-
radiansToSignedPeriodicFraction(radians: number): number;
|
|
236
|
+
radiansToSignedPeriodicFraction(radians: number, zeroSweepDefault?: number): number;
|
|
197
237
|
/**
|
|
198
238
|
* Return the fractionalized position of the given angle (as Angle) computed with consideration of
|
|
199
239
|
* 2PI period and with consideration of angle sweep direction (CW or CCW).
|
|
@@ -203,8 +243,52 @@ export declare class AngleSweep implements BeJSONFunctions {
|
|
|
203
243
|
* * negative fraction for angles "before" the start angle
|
|
204
244
|
* * fraction larger than one for angles "after" the end angle
|
|
205
245
|
* * allows period shift
|
|
246
|
+
* @param theta input angle
|
|
247
|
+
* @param zeroSweepDefault return value when this sweep is empty (default 0)
|
|
248
|
+
* @returns fraction, or `zeroSweepDefault` if this sweep is empty.
|
|
249
|
+
*/
|
|
250
|
+
angleToSignedPeriodicFraction(theta: Angle, zeroSweepDefault?: number): number;
|
|
251
|
+
/**
|
|
252
|
+
* Return the fractionalized position of the given radian angle with respect to the sweep.
|
|
253
|
+
* * The start angle returns fraction 0
|
|
254
|
+
* * The end angle returns fraction 1
|
|
255
|
+
* * Interior angles (and their multiples of 2PI) return fractions in [0,1].
|
|
256
|
+
* * Exterior angles return fractions outside [0,1] according to `toNegativeFraction`.
|
|
257
|
+
* @param radians input angle (in radians)
|
|
258
|
+
* @param radians0 start angle of sweep (in radians)
|
|
259
|
+
* @param radians1 end angle of sweep (in radians)
|
|
260
|
+
* @param toNegativeFraction convert an exterior angle to a negative number (true), or to
|
|
261
|
+
* a number greater than one (false, default). If false, this is just [[radiansToPositivePeriodicFractionStartEnd]].
|
|
262
|
+
* @param zeroSweepDefault return value when the sweep is empty (default 0).
|
|
263
|
+
* @returns fraction, or `zeroSweepDefault` if the sweep is empty
|
|
264
|
+
*/
|
|
265
|
+
static radiansToSignedFractionStartEnd(radians: number, radians0: number, radians1: number, toNegativeFraction?: boolean, zeroSweepDefault?: number): number;
|
|
266
|
+
/**
|
|
267
|
+
* Return the fractionalized position of the given radian angle with respect to this sweep.
|
|
268
|
+
* * The start angle returns fraction 0
|
|
269
|
+
* * The end angle returns fraction 1
|
|
270
|
+
* * Interior angles (and their multiples of 2PI) return fractions in [0,1].
|
|
271
|
+
* * Exterior angles return fractions outside [0,1] according to `toNegativeFraction`.
|
|
272
|
+
* @param radians input angle (in radians)
|
|
273
|
+
* @param toNegativeFraction convert an exterior angle to a negative number (true), or to
|
|
274
|
+
* a number greater than one (false, default). If false, this is just [[radiansToPositivePeriodicFraction]].
|
|
275
|
+
* @param zeroSweepDefault return value when this sweep is empty (default 0).
|
|
276
|
+
* @returns fraction, or `zeroSweepDefault` if this sweep is empty
|
|
277
|
+
*/
|
|
278
|
+
radiansToSignedFraction(radians: number, toNegativeFraction?: boolean, zeroSweepDefault?: number): number;
|
|
279
|
+
/**
|
|
280
|
+
* Return the fractionalized position of the given angle with respect to this sweep.
|
|
281
|
+
* * The start angle returns fraction 0
|
|
282
|
+
* * The end angle returns fraction 1
|
|
283
|
+
* * Interior angles (and their multiples of 2PI) return fractions in [0,1].
|
|
284
|
+
* * Exterior angles return fractions outside [0,1] according to `toNegativeFraction`.
|
|
285
|
+
* @param theta input angle
|
|
286
|
+
* @param toNegativeFraction convert an exterior angle to a negative number (true), or to
|
|
287
|
+
* a number greater than one (false, default). If false, this is just [[angleToPositivePeriodicFraction]].
|
|
288
|
+
* @param zeroSweepDefault return value when this sweep is empty (default 0).
|
|
289
|
+
* @returns fraction, or `zeroSweepDefault` if this sweep is empty
|
|
206
290
|
*/
|
|
207
|
-
|
|
291
|
+
angleToSignedFraction(theta: Angle, toNegativeFraction?: boolean, zeroSweepDefault?: number): number;
|
|
208
292
|
/** Test if the given angle (as radians) is within sweep (between radians0 and radians1) */
|
|
209
293
|
static isRadiansInStartEnd(radians: number, radians0: number, radians1: number, allowPeriodShift?: boolean): boolean;
|
|
210
294
|
/** Test if the given angle (as radians) is within sweep */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AngleSweep.d.ts","sourceRoot":"","sources":["../../../src/geometry3d/AngleSweep.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,eAAe,EAAY,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,UAAW,YAAW,eAAe;IAChD,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,SAAS,CAAS;IAC1B,iEAAiE;IACjE,IAAW,YAAY,WAEtB;IACD,+DAA+D;IAC/D,IAAW,UAAU,WAEpB;IACD,8DAA8D;IAC9D,IAAW,YAAY,WAEtB;IACD,iEAAiE;IACjE,IAAW,YAAY,WAEtB;IACD,+DAA+D;IAC/D,IAAW,UAAU,WAEpB;IACD,8DAA8D;IAC9D,IAAW,YAAY,WAEtB;IACD,sFAAsF;IACtF,IAAW,OAAO,YAEjB;IACD,8CAA8C;IAC9C,IAAW,UAAU,UAEpB;IACD,4CAA4C;IAC5C,IAAW,QAAQ,UAElB;IACD;;;;;OAKG;WACW,MAAM,CAAC,IAAI,CAAC,EAAE,UAAU,GAAG,KAAK,GAAG,UAAU;IAO3D;;;;;;;;;;OAUG;IACH,OAAO;IAIP;;;OAGG;IACI,kBAAkB,CAAC,YAAY,GAAE,MAAU,EAAE,UAAU,GAAE,MAAsB;IAQtF,uDAAu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IACI,6BAA6B,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO;IAMhE;;;OAGG;IACI,0BAA0B,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO;IAI7D;;;;;OAKG;IACI,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO;CAGjD"}
|
|
@@ -216,9 +216,10 @@ class AngleSweep {
|
|
|
216
216
|
/**
|
|
217
217
|
* Return 2PI divided by the sweep radians (i.e. 360 degrees divided by sweep angle).
|
|
218
218
|
* * This is the number of fractional intervals required to cover a whole circle.
|
|
219
|
+
* @returns period of the sweep, or 1 if sweep is empty.
|
|
219
220
|
*/
|
|
220
221
|
fractionPeriod() {
|
|
221
|
-
return
|
|
222
|
+
return this.isEmpty ? 1.0 : Angle_1.Angle.pi2Radians / Math.abs(this._radians1 - this._radians0);
|
|
222
223
|
}
|
|
223
224
|
/**
|
|
224
225
|
* Return the fractionalized position of the given angle (as Angle) computed without consideration of
|
|
@@ -231,68 +232,100 @@ class AngleSweep {
|
|
|
231
232
|
* * fraction larger than one for angles "before" the start angle if start > end
|
|
232
233
|
* * negative fraction for angles "after" the end angle if start > end
|
|
233
234
|
* * does not allow period shift
|
|
235
|
+
* @returns unbounded fraction, or 1 if sweep is empty.
|
|
234
236
|
*/
|
|
235
237
|
angleToUnboundedFraction(theta) {
|
|
236
|
-
return
|
|
238
|
+
return this.isEmpty ? 1.0 : (theta.radians - this._radians0) / (this._radians1 - this._radians0);
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Convert a sweep fraction to the equivalent period-shifted fraction inside the sweep, or within one period of zero
|
|
242
|
+
* on the desired side.
|
|
243
|
+
* @param fraction fraction of the sweep.
|
|
244
|
+
* @param radians0 start angle of sweep (in radians).
|
|
245
|
+
* @param radians1 end angle of sweep (in radians).
|
|
246
|
+
* @param toNegativeFraction return an exterior fraction period-shifted to within one period of the start (true) or
|
|
247
|
+
* end (false) of the sweep.
|
|
248
|
+
* @returns period-shifted fraction. If `fraction` is already in [0,1], or the sweep is empty, then `fraction` is
|
|
249
|
+
* returned unchanged.
|
|
250
|
+
*/
|
|
251
|
+
static fractionToSignedPeriodicFractionStartEnd(fraction, radians0, radians1, toNegativeFraction) {
|
|
252
|
+
const sweep = radians1 - radians0;
|
|
253
|
+
if (Angle_1.Angle.isAlmostEqualRadiansNoPeriodShift(0, sweep))
|
|
254
|
+
return fraction; // empty sweep
|
|
255
|
+
if (Geometry_1.Geometry.isIn01(fraction))
|
|
256
|
+
return fraction;
|
|
257
|
+
const period = Angle_1.Angle.pi2Radians / Math.abs(sweep);
|
|
258
|
+
fraction = fraction % period; // period-shifted equivalent fraction closest to 0 with same sign as fraction
|
|
259
|
+
if (fraction + period < 1)
|
|
260
|
+
fraction += period; // it's really an interior fraction
|
|
261
|
+
if (Geometry_1.Geometry.isIn01(fraction) || (toNegativeFraction && fraction < 0) || (!toNegativeFraction && fraction > 1))
|
|
262
|
+
return fraction;
|
|
263
|
+
return toNegativeFraction ? fraction - period : fraction + period; // shift to other side of sweep
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Convert a sweep fraction to the equivalent period-shifted fraction inside this sweep, or within one period of
|
|
267
|
+
* zero on the desired side.
|
|
268
|
+
* @param fraction fraction of the sweep.
|
|
269
|
+
* @param toNegativeFraction return an exterior fraction period-shifted to within one period of the start (true) or
|
|
270
|
+
* end (false) of the sweep.
|
|
271
|
+
* @returns period-shifted fraction. If `fraction` is already in [0,1], or the sweep is empty, then `fraction` is
|
|
272
|
+
* returned unchanged.
|
|
273
|
+
*/
|
|
274
|
+
fractionToSignedPeriodicFraction(fraction, toNegativeFraction) {
|
|
275
|
+
return AngleSweep.fractionToSignedPeriodicFractionStartEnd(fraction, this._radians0, this._radians1, toNegativeFraction);
|
|
237
276
|
}
|
|
238
277
|
/**
|
|
239
278
|
* Return the fractionalized position of the given angle (as radians), computed with consideration of 2PI period.
|
|
240
279
|
* * consider radians0 as `start` angle of the sweep and radians1 as `end` angle of the sweep
|
|
241
|
-
* * fraction is always positive
|
|
242
280
|
* * the start angle is at fraction 0
|
|
243
281
|
* * the end angle is at fraction 1
|
|
244
282
|
* * interior angles are between 0 and 1
|
|
245
283
|
* * all exterior angles are at fractions greater than 1
|
|
246
284
|
* * allows period shift
|
|
285
|
+
* @param radians input angle (in radians)
|
|
286
|
+
* @param radians0 start angle of sweep (in radians)
|
|
287
|
+
* @param radians1 end angle of sweep (in radians)
|
|
288
|
+
* @param zeroSweepDefault return value when the sweep is empty (default 0)
|
|
289
|
+
* @returns nonnegative fraction, or `zeroSweepDefault` if the sweep is empty.
|
|
247
290
|
*/
|
|
248
291
|
static radiansToPositivePeriodicFractionStartEnd(radians, radians0, radians1, zeroSweepDefault = 0.0) {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
else {
|
|
257
|
-
if (Angle_1.Angle.isAlmostEqualRadiansAllowPeriodShift(radians, radians0))
|
|
258
|
-
return 0.0;
|
|
259
|
-
if (Angle_1.Angle.isAlmostEqualRadiansAllowPeriodShift(radians, radians1))
|
|
260
|
-
return 1.0;
|
|
292
|
+
const zeroSweepMarker = Geometry_1.Geometry.largeCoordinateResult;
|
|
293
|
+
let fraction = this.radiansToSignedPeriodicFractionStartEnd(radians, radians0, radians1, zeroSweepMarker);
|
|
294
|
+
if (fraction === zeroSweepMarker)
|
|
295
|
+
return zeroSweepDefault;
|
|
296
|
+
if (fraction < 0) {
|
|
297
|
+
const period = Angle_1.Angle.pi2Radians / Math.abs(radians1 - radians0);
|
|
298
|
+
fraction += period;
|
|
261
299
|
}
|
|
262
|
-
|
|
263
|
-
const delta = radians - radians0;
|
|
264
|
-
if (sweep > 0) {
|
|
265
|
-
const delta1 = Angle_1.Angle.adjustRadians0To2Pi(delta);
|
|
266
|
-
const fraction1 = Geometry_1.Geometry.safeDivideFraction(delta1, sweep, zeroSweepDefault);
|
|
267
|
-
return fraction1;
|
|
268
|
-
}
|
|
269
|
-
const delta2 = Angle_1.Angle.adjustRadians0To2Pi(-delta);
|
|
270
|
-
const fraction2 = Geometry_1.Geometry.safeDivideFraction(delta2, -sweep, zeroSweepDefault);
|
|
271
|
-
return fraction2;
|
|
300
|
+
return fraction;
|
|
272
301
|
}
|
|
273
302
|
/**
|
|
274
303
|
* Return the fractionalized position of the given angle (as radians), computed with consideration of 2PI period.
|
|
275
|
-
* * fraction is always positive
|
|
276
304
|
* * the start angle is at fraction 0
|
|
277
305
|
* * the end angle is at fraction 1
|
|
278
306
|
* * interior angles are between 0 and 1
|
|
279
307
|
* * all exterior angles are at fractions greater than 1
|
|
280
308
|
* * allows period shift
|
|
309
|
+
* @param radians input angle (in radians)
|
|
310
|
+
* @param zeroSweepDefault return value when this sweep is empty (default 0)
|
|
311
|
+
* @returns nonnegative fraction, or `zeroSweepDefault` if the sweep is empty.
|
|
281
312
|
*/
|
|
282
313
|
radiansToPositivePeriodicFraction(radians, zeroSweepDefault = 0.0) {
|
|
283
314
|
return AngleSweep.radiansToPositivePeriodicFractionStartEnd(radians, this._radians0, this._radians1, zeroSweepDefault);
|
|
284
315
|
}
|
|
285
316
|
/**
|
|
286
317
|
* Return the fractionalized position of the given angle (as Angle), computed with consideration of 2PI period.
|
|
287
|
-
* * fraction is always positive
|
|
288
318
|
* * the start angle is at fraction 0
|
|
289
319
|
* * the end angle is at fraction 1
|
|
290
320
|
* * interior angles are between 0 and 1
|
|
291
321
|
* * all exterior angles are at fractions greater than 1
|
|
292
322
|
* * allows period shift
|
|
323
|
+
* @param theta input angle
|
|
324
|
+
* @param zeroSweepDefault return value when this sweep is empty (default 0)
|
|
325
|
+
* @returns nonnegative fraction, or `zeroSweepDefault` if the sweep is empty.
|
|
293
326
|
*/
|
|
294
|
-
angleToPositivePeriodicFraction(theta) {
|
|
295
|
-
return this.radiansToPositivePeriodicFraction(theta.radians);
|
|
327
|
+
angleToPositivePeriodicFraction(theta, zeroSweepDefault = 0.0) {
|
|
328
|
+
return this.radiansToPositivePeriodicFraction(theta.radians, zeroSweepDefault);
|
|
296
329
|
}
|
|
297
330
|
/**
|
|
298
331
|
* Return the fractionalized position of the given array of angles (as radian), computed with consideration of 2PI period.
|
|
@@ -318,10 +351,18 @@ class AngleSweep {
|
|
|
318
351
|
* * negative fraction for angles "before" the start angle
|
|
319
352
|
* * fraction larger than one for angles "after" the end angle
|
|
320
353
|
* * allows period shift
|
|
354
|
+
* @param radians input angle (in radians)
|
|
355
|
+
* @param radians0 start angle of sweep (in radians)
|
|
356
|
+
* @param radians1 end angle of sweep (in radians)
|
|
357
|
+
* @param zeroSweepDefault return value when the sweep is empty (default 0)
|
|
358
|
+
* @returns fraction, or `zeroSweepDefault` if the sweep is empty.
|
|
321
359
|
*/
|
|
322
|
-
static radiansToSignedPeriodicFractionStartEnd(radians, radians0, radians1) {
|
|
360
|
+
static radiansToSignedPeriodicFractionStartEnd(radians, radians0, radians1, zeroSweepDefault = 0.0) {
|
|
361
|
+
const sweep = radians1 - radians0;
|
|
362
|
+
if (Angle_1.Angle.isAlmostEqualRadiansNoPeriodShift(0, sweep))
|
|
363
|
+
return zeroSweepDefault;
|
|
323
364
|
if (Angle_1.Angle.isAlmostEqualRadiansAllowPeriodShift(radians0, radians1)) {
|
|
324
|
-
// for 2nPi
|
|
365
|
+
// for sweep = 2nPi !== 0, allow matching without period shift, else we never return 1.0
|
|
325
366
|
if (Angle_1.Angle.isAlmostEqualRadiansNoPeriodShift(radians, radians0))
|
|
326
367
|
return 0.0;
|
|
327
368
|
if (Angle_1.Angle.isAlmostEqualRadiansNoPeriodShift(radians, radians1))
|
|
@@ -333,16 +374,8 @@ class AngleSweep {
|
|
|
333
374
|
if (Angle_1.Angle.isAlmostEqualRadiansAllowPeriodShift(radians, radians1))
|
|
334
375
|
return 1.0;
|
|
335
376
|
}
|
|
336
|
-
const
|
|
337
|
-
|
|
338
|
-
if (sweep > 0) {
|
|
339
|
-
const delta1 = Angle_1.Angle.adjustRadiansMinusPiPlusPi(delta);
|
|
340
|
-
const fraction1 = 0.5 + Geometry_1.Geometry.safeDivideFraction(delta1, sweep, 0.0);
|
|
341
|
-
return fraction1;
|
|
342
|
-
}
|
|
343
|
-
const delta2 = Angle_1.Angle.adjustRadiansMinusPiPlusPi(-delta);
|
|
344
|
-
const fraction = 0.5 + Geometry_1.Geometry.safeDivideFraction(delta2, -sweep, 0.0);
|
|
345
|
-
return fraction;
|
|
377
|
+
const fraction = (radians - radians0) / sweep;
|
|
378
|
+
return this.fractionToSignedPeriodicFractionStartEnd(fraction, radians0, radians1, fraction < 0);
|
|
346
379
|
}
|
|
347
380
|
/**
|
|
348
381
|
* Return the fractionalized position of the given angle (as radians) computed with consideration of
|
|
@@ -353,9 +386,12 @@ class AngleSweep {
|
|
|
353
386
|
* * negative fraction for angles "before" the start angle
|
|
354
387
|
* * fraction larger than one for angles "after" the end angle
|
|
355
388
|
* * allows period shift
|
|
389
|
+
* @param radians input angle (in radians)
|
|
390
|
+
* @param zeroSweepDefault return value when this sweep is empty (default 0)
|
|
391
|
+
* @returns fraction, or `zeroSweepDefault` if this sweep is empty.
|
|
356
392
|
*/
|
|
357
|
-
radiansToSignedPeriodicFraction(radians) {
|
|
358
|
-
return AngleSweep.radiansToSignedPeriodicFractionStartEnd(radians, this._radians0, this._radians1);
|
|
393
|
+
radiansToSignedPeriodicFraction(radians, zeroSweepDefault = 0.0) {
|
|
394
|
+
return AngleSweep.radiansToSignedPeriodicFractionStartEnd(radians, this._radians0, this._radians1, zeroSweepDefault);
|
|
359
395
|
}
|
|
360
396
|
/**
|
|
361
397
|
* Return the fractionalized position of the given angle (as Angle) computed with consideration of
|
|
@@ -366,9 +402,69 @@ class AngleSweep {
|
|
|
366
402
|
* * negative fraction for angles "before" the start angle
|
|
367
403
|
* * fraction larger than one for angles "after" the end angle
|
|
368
404
|
* * allows period shift
|
|
405
|
+
* @param theta input angle
|
|
406
|
+
* @param zeroSweepDefault return value when this sweep is empty (default 0)
|
|
407
|
+
* @returns fraction, or `zeroSweepDefault` if this sweep is empty.
|
|
408
|
+
*/
|
|
409
|
+
angleToSignedPeriodicFraction(theta, zeroSweepDefault = 0.0) {
|
|
410
|
+
return this.radiansToSignedPeriodicFraction(theta.radians, zeroSweepDefault);
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Return the fractionalized position of the given radian angle with respect to the sweep.
|
|
414
|
+
* * The start angle returns fraction 0
|
|
415
|
+
* * The end angle returns fraction 1
|
|
416
|
+
* * Interior angles (and their multiples of 2PI) return fractions in [0,1].
|
|
417
|
+
* * Exterior angles return fractions outside [0,1] according to `toNegativeFraction`.
|
|
418
|
+
* @param radians input angle (in radians)
|
|
419
|
+
* @param radians0 start angle of sweep (in radians)
|
|
420
|
+
* @param radians1 end angle of sweep (in radians)
|
|
421
|
+
* @param toNegativeFraction convert an exterior angle to a negative number (true), or to
|
|
422
|
+
* a number greater than one (false, default). If false, this is just [[radiansToPositivePeriodicFractionStartEnd]].
|
|
423
|
+
* @param zeroSweepDefault return value when the sweep is empty (default 0).
|
|
424
|
+
* @returns fraction, or `zeroSweepDefault` if the sweep is empty
|
|
425
|
+
*/
|
|
426
|
+
static radiansToSignedFractionStartEnd(radians, radians0, radians1, toNegativeFraction = false, zeroSweepDefault = 0.0) {
|
|
427
|
+
const zeroSweepMarker = Geometry_1.Geometry.largeCoordinateResult;
|
|
428
|
+
let fraction = this.radiansToSignedPeriodicFractionStartEnd(radians, radians0, radians1, zeroSweepMarker);
|
|
429
|
+
if (fraction === zeroSweepMarker)
|
|
430
|
+
return zeroSweepDefault;
|
|
431
|
+
if ((toNegativeFraction && fraction > 1) || (!toNegativeFraction && fraction < 0)) {
|
|
432
|
+
let period = Angle_1.Angle.pi2Radians / Math.abs(radians1 - radians0);
|
|
433
|
+
if (toNegativeFraction)
|
|
434
|
+
period = -period;
|
|
435
|
+
fraction += period;
|
|
436
|
+
}
|
|
437
|
+
return fraction;
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Return the fractionalized position of the given radian angle with respect to this sweep.
|
|
441
|
+
* * The start angle returns fraction 0
|
|
442
|
+
* * The end angle returns fraction 1
|
|
443
|
+
* * Interior angles (and their multiples of 2PI) return fractions in [0,1].
|
|
444
|
+
* * Exterior angles return fractions outside [0,1] according to `toNegativeFraction`.
|
|
445
|
+
* @param radians input angle (in radians)
|
|
446
|
+
* @param toNegativeFraction convert an exterior angle to a negative number (true), or to
|
|
447
|
+
* a number greater than one (false, default). If false, this is just [[radiansToPositivePeriodicFraction]].
|
|
448
|
+
* @param zeroSweepDefault return value when this sweep is empty (default 0).
|
|
449
|
+
* @returns fraction, or `zeroSweepDefault` if this sweep is empty
|
|
450
|
+
*/
|
|
451
|
+
radiansToSignedFraction(radians, toNegativeFraction = false, zeroSweepDefault = 0.0) {
|
|
452
|
+
return AngleSweep.radiansToSignedFractionStartEnd(radians, this._radians0, this._radians1, toNegativeFraction, zeroSweepDefault);
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Return the fractionalized position of the given angle with respect to this sweep.
|
|
456
|
+
* * The start angle returns fraction 0
|
|
457
|
+
* * The end angle returns fraction 1
|
|
458
|
+
* * Interior angles (and their multiples of 2PI) return fractions in [0,1].
|
|
459
|
+
* * Exterior angles return fractions outside [0,1] according to `toNegativeFraction`.
|
|
460
|
+
* @param theta input angle
|
|
461
|
+
* @param toNegativeFraction convert an exterior angle to a negative number (true), or to
|
|
462
|
+
* a number greater than one (false, default). If false, this is just [[angleToPositivePeriodicFraction]].
|
|
463
|
+
* @param zeroSweepDefault return value when this sweep is empty (default 0).
|
|
464
|
+
* @returns fraction, or `zeroSweepDefault` if this sweep is empty
|
|
369
465
|
*/
|
|
370
|
-
|
|
371
|
-
return this.
|
|
466
|
+
angleToSignedFraction(theta, toNegativeFraction = false, zeroSweepDefault = 0.0) {
|
|
467
|
+
return this.radiansToSignedFraction(theta.radians, toNegativeFraction, zeroSweepDefault);
|
|
372
468
|
}
|
|
373
469
|
/** Test if the given angle (as radians) is within sweep (between radians0 and radians1) */
|
|
374
470
|
static isRadiansInStartEnd(radians, radians0, radians1, allowPeriodShift = true) {
|