opengl_learn

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

ogl_mat4f_isapproxequal.c (369B)


      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 "ogl.h"
      9 
     10 int
     11 ogl_mat4f_isapproxequal(
     12 	struct ogl_mat4f a, struct ogl_mat4f b
     13 ) {
     14 	int result = 1;
     15 
     16 	for (size_t i=0; i<16; i++) {
     17 		result &= (ogl_GLfloat_isapproxequal(a.values[i], b.values[i]));
     18 	}
     19 
     20 	return result;
     21 }
     22