Finds the roots of two halfspaces.

Namespace: Spherical
Assembly: SphericalLib (in SphericalLib.dll) Version: 1.0.5951.32246 (1.0.0.0)

Syntax

C#
public int Roots(
	Halfspace that,
	out Cartesian pos,
	out Cartesian neg
)
Visual C++
public:
int Roots(
	Halfspace that, 
	[OutAttribute] Cartesian% pos, 
	[OutAttribute] Cartesian% neg
)
F#
member Roots : 
        that:Halfspace * 
        pos:Cartesian byref * 
        neg:Cartesian byref -> int 

Parameters

that
Type: Spherical..::..Halfspace
The halfspace to intersect.
pos
Type: Spherical..::..Cartesian%
The 'positive' root. (Output)
neg
Type: Spherical..::..Cartesian%
The 'negative' root. (Output)

Return Value

The return value is 2 if found both roots.

The return value is 0 if vectors are co-linear.

The return value is -1 if vectors are not co-linear but no roots.

The return value is -3 if circles are barely touching, so no roots.

Remarks

The root finder will only return roots if there are two. Touching circles are not considered intersecting because of numerical precision.

See Also