opengl_learn

Step-by-step introduction to OpenGL
git clone https://0xdd.org/code/opengl_learn.git
Log | Files | Refs | README | LICENSE

ogl_GLfloat_isapproxequal.c (274B)


      1 /*
      2 2018 David DiPaola
      3 licensed under CC0 (public domain, see https://creativecommons.org/publicdomain/zero/1.0/)
      4 */
      5 
      6 #include <GL/glew.h>
      7 
      8 #include <math.h>
      9 
     10 #include <float.h>
     11 
     12 int
     13 ogl_GLfloat_isapproxequal(
     14 	GLfloat a, GLfloat b
     15 ) {
     16 	return (fabsf(a - b) < 0.000001f);
     17 }
     18