MCPcopy Create free account
hub / github.com/Kitware/VTK / Sign

Function Sign

Common/DataModel/vtkBoundingBox.cxx:22–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20namespace
21{
22inline double Sign(const double& a)
23{
24 // NOLINTNEXTLINE(readability-avoid-nested-conditional-operator)
25 return a > 0.0 ? 1.0 : (a < 0 ? -1.0 : 0.0);
26}
27inline bool OppSign(const double& a, const double& b)
28{
29 return (a <= 0 && b >= 0) || (a >= 0 && b <= 0);

Callers 1

IntersectPlaneMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected