## SmallSystem Class

static methods for commonly appearing sets of equations in 2 or 3 variables

### Methods

Name Description
eliminateFromPivot(rowA: Float64Array, pivotIndex: number, rowB: Float64Array, a: number): boolean Static in rowB, replace `rowB[j] += a rowB[pivot] * rowA[j] / rowA[pivot]`for`j>pivot`
lineSegment2dXYTransverseIntersectionUnbounded(a0: Point2d, a1: Point2d, b0: Point2d, b1: Point2d, result: Vector2d): boolean Static Return true if lines (a0,a1) to (b0, b1) have a simple intersection.
lineSegment3dClosestApproachUnbounded(a0: Point3d, a1: Point3d, b0: Point3d, b1: Point3d, result: Vector2d): boolean Static Return true if lines (a0,a1) to (b0, b1) have closest approach (go by each other) in 3d
Return the fractional (not xy) coordinates in result.x, result.y

lineSegment3dClosestPointUnbounded(pointA0: Point3d, pointA1: Point3d, spacePoint: Point3d): number | undefined Static Return the line fraction at which the line is closest to a space point
lineSegment3dHXYClosestPointUnbounded(hA0: Point4d, hA1: Point4d, spacePoint: Point4d): number | undefined Static Return the line fraction at which the (homogeneous) line is closest to a space point as viewed in xy only.
lineSegment3dHXYTransverseIntersectionUnbounded(hA0: Point4d, hA1: Point4d, hB0: Point4d, hB1: Point4d, result?: Vector2d): Vector2d | undefined Static Return true if lines (a0,a1) to (b0, b1) have a simple intersection using only xy parts of WEIGHTED 4D Points
Return the fractional (not xy) coordinates in result.x, result.y

lineSegment3dXYClosestPointUnbounded(pointA0: XAndY, pointA1: XAndY, spacePoint: XAndY): number | undefined Static Return the line fraction at which the line is closest to a space point as viewed in xy only.
lineSegment3dXYTransverseIntersectionUnbounded(a0: Point3d, a1: Point3d, b0: Point3d, b1: Point3d, result: Vector2d): boolean Static Return true if lines (a0,a1) to (b0, b1) have a simple intersection using only xy parts
Return the fractional (not xy) coordinates in result.x, result.y

lineSegmentXYUVTransverseIntersectionUnbounded(ax0: number, ay0: number, ux: number, uy: number, bx0: number, by0: number, vx: number, vy: number, result: Vector2d): boolean Static * (ax0,ay0) to (ax0+ux,ay0+uy) are line A.
linearSystem2d(ux: number, vx: number, uy: number, vy: number, cx: number, cy: number, result: Vector2d): boolean Static Solve the pair of linear equations
`ux x + vx + y = cx`<br>*`uy x + vy y = cy`

linearSystem3d(axx: number, axy: number, axz: number, ayx: number, ayy: number, ayz: number, azx: number, azy: number, azz: number, cx: number, cy: number, cz: number, result?: Vector3d): Vector3d | undefined Static Solve a linear system
x equation: `ux u vx v + wx w = cx`
y equation: `uy *u * vy * v + wy * w = cy`
z equation: `uz u vz v + wz * w = cz`

ray3dXYZUVWClosestApproachUnbounded(ax: number, ay: number, az: number, au: number, av: number, aw: number, bx: number, by: number, bz: number, bu: number, bv: number, bw: number, result: Vector2d): boolean Static Return true if lines (a0,a1) to (b0, b1) have closest approach (go by each other) in 3d
Return the fractional (not xy) coordinates as x and y parts of a Point2d.

solveBilinearPair(a0: number, b0: number, c0: number, d0: number, a1: number, b1: number, c1: number, d1: number): Point2d[] | undefined Static Solve a pair of bilinear equations
First equation: `a0 + b0 u + c0 v + d0 u v = 0`
Second equation: `a0 + b0 * u + c0 * v + d0 * u * v = 0`

### Defined in

Last Updated: 10 September, 2019