Garfield++ v2r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
vfloat.h
Go to the documentation of this file.
1#ifndef VFLOAT_H
2#define VFLOAT_H
3#include <cfloat>
4#ifdef VISUAL_STUDIO
5#define _USE_MATH_DEFINES
6// see comment in math.h:
7/* Define _USE_MATH_DEFINES before including math.h to expose these macro
8 * definitions for common math constants. These are placed under an #ifdef
9 * since these commonly-defined names are not part of the C/C++ standards.
10 */
11#endif
12#include <cmath>
13
14namespace Heed {
15
16typedef double vfloat;
17const vfloat vprecision = 1.0E-12;
18static const vfloat max_vfloat = DBL_MAX;
19
20inline bool apeq(const vfloat f1, const vfloat f2,
21 const vfloat prec = vprecision) {
22 return (fabs(f1 - f2) <= prec);
23}
24
25}
26
27#endif
Definition: BGMesh.cpp:5
bool apeq(const circumf &f1, const circumf &f2, vfloat prec)
Definition: circumf.cpp:44
DoubleAc fabs(const DoubleAc &f)
Definition: DoubleAc.h:615
const vfloat vprecision
Definition: vfloat.h:17
double vfloat
Definition: vfloat.h:16