libigl v2.5.0
Loading...
Searching...
No Matches
EPS.h
Go to the documentation of this file.
1// This file is part of libigl, a simple c++ geometry processing library.
2//
3// Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
4//
5// This Source Code Form is subject to the terms of the Mozilla Public License
6// v. 2.0. If a copy of the MPL was not distributed with this file, You can
7// obtain one at http://mozilla.org/MPL/2.0/.
8#ifndef IGL_EPS_H
9#define IGL_EPS_H
10#include "igl_inline.h"
11namespace igl
12{
14 const double DOUBLE_EPS = 1.0e-14;
16 const double DOUBLE_EPS_SQ = 1.0e-28;
18 const float FLOAT_EPS = 1.0e-7f;
20 const float FLOAT_EPS_SQ = 1.0e-14f;
22 template <typename S_type> IGL_INLINE S_type EPS();
24 template <typename S_type> IGL_INLINE S_type EPS_SQ();
25 // Template specializations for float and double
26 template <> IGL_INLINE float EPS<float>();
27 template <> IGL_INLINE double EPS<double>();
28 template <> IGL_INLINE float EPS_SQ<float>();
29 template <> IGL_INLINE double EPS_SQ<double>();
30}
31
32#ifndef IGL_STATIC_LIBRARY
33# include "EPS.cpp"
34#endif
35
36#endif
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:17
const float FLOAT_EPS_SQ
Standard value for single epsilonĀ²
Definition EPS.h:20
double EPS_SQ< double >()
const float FLOAT_EPS
Standard value for single epsilon.
Definition EPS.h:18
double EPS< double >()
const double DOUBLE_EPS
Standard value for double epsilon.
Definition EPS.h:14
float EPS_SQ< float >()
const double DOUBLE_EPS_SQ
Standard value for double epsilonĀ²
Definition EPS.h:16
S_type EPS_SQ()
Function returning EPS_SQ for corresponding type.
float EPS< float >()
S_type EPS()
Function returning EPS for corresponding type.