n-Dimensional Fast Methods  0.7
 All Classes Functions Variables Typedefs Pages
utils Class Reference

Provides helper code not related with specific classes. Copyright (C) 2014 Javier V. Gomez www.javiervgomez.com. More...

#include <utils.h>

Static Public Member Functions

static bool isTimeBetterThan (double t1, double t2)
 Returns true if t1 is at least epsilon-lower than t2, provides robust comparions for doubles.
 
static unsigned int absUI (int a)
 An user-implemented absolute value function for integer values.
 

Static Public Attributes

static constexpr double COMP_MARGIN = std::numeric_limits<double>::epsilon() * 1e5
 When comparing doubles if(a < b), do if(a+COMP_MARGIN < b) to avoid double precission issues.
 

Detailed Description

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition at line 23 of file utils.h.


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