X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2FMoof%2Fcml%2Fmathlib%2Fepsilon.h;fp=src%2FMoof%2Fcml%2Fmathlib%2Fepsilon.h;h=14059fae70c70912039be5010f872512e0d8abbf;hb=c2321281bf12a7efaedde930422c7ddbc92080d4;hp=0000000000000000000000000000000000000000;hpb=87bc17e55b0c1dc73ecc66df856d3f08fd7a7724;p=chaz%2Fyoink diff --git a/src/Moof/cml/mathlib/epsilon.h b/src/Moof/cml/mathlib/epsilon.h new file mode 100644 index 0000000..14059fa --- /dev/null +++ b/src/Moof/cml/mathlib/epsilon.h @@ -0,0 +1,44 @@ +/* -*- C++ -*- ------------------------------------------------------------ + +Copyright (c) 2007 Jesse Anders and Demian Nave http://cmldev.net/ + +The Configurable Math Library (CML) is distributed under the terms of the +Boost Software License, v1.0 (see cml/LICENSE for details). + + *-----------------------------------------------------------------------*/ +/** @file + * @brief + */ + +#ifndef epsilon_h +#define epsilon_h + +namespace cml { + +/* @todo: epsilon and tolerance handling. + * + * @note This is a placeholder for a more sophisticated epsilon/tolerance + * system. + */ + +template < typename Real > +struct epsilon +{ + typedef Real value_type; + +private: + + /** For convenience */ + typedef value_type T; + +public: + + static T placeholder() { + /* Completely arbitrary placeholder value: */ + return T(0.0001); + } +}; + +} // namespace cml + +#endif