Add some nice math helping functions

This commit is contained in:
Godzil
2020-02-14 14:21:57 +00:00
parent 8144e38aa0
commit 7b07106816
2 changed files with 32 additions and 0 deletions

17
source/math_helper.cpp Normal file
View File

@@ -0,0 +1,17 @@
/*
* DoRayMe - a quick and dirty Raytracer
* Math helping functions
*
* Created by Manoël Trapier
* Copyright (c) 2020 986-Studio.
*
*/
#include <math.h>
#include <float.h>
#include <math_helper.h>
bool double_equal(double a, double b)
{
return fabs(a - b) < DBL_EPSILON;
}