GEOS  3.14.0dev
Static Public Member Functions | List of all members
geos::algorithm::RobustDeterminant Class Reference

Implements an algorithm to compute the sign of a 2x2 determinant for double precision values robustly. More...

#include <RobustDeterminant.h>

Static Public Member Functions

static int signOfDet2x2 (double x1, double y1, double x2, double y2)
 Computes the sign of the determinant of the 2x2 matrix with the given entries, in a robust way. More...
 

Detailed Description

Implements an algorithm to compute the sign of a 2x2 determinant for double precision values robustly.

It is a direct translation of code developed by Olivier Devillers.

The original code carries the following copyright notice:


The original code carries the following copyright notice:
Author : Olivier Devillers
Olivi.nosp@m.er.D.nosp@m.evill.nosp@m.ers@.nosp@m.sophi.nosp@m.a.in.nosp@m.ria.f.nosp@m.r
http:/www.inria.fr:/prisme/personnel/devillers/anglais/determinant.html


             Copyright (c) 1995  by  INRIA Prisme Project
                 BP 93 06902 Sophia Antipolis Cedex, France.
                          All rights reserved

Member Function Documentation

◆ signOfDet2x2()

static int geos::algorithm::RobustDeterminant::signOfDet2x2 ( double  x1,
double  y1,
double  x2,
double  y2 
)
static

Computes the sign of the determinant of the 2x2 matrix with the given entries, in a robust way.

Returns
-1 if the determinant is negative,
1 if the determinant is positive,
0 if the determinant is 0.

The documentation for this class was generated from the following file: