Update norm.h to be safe

This commit is contained in:
PedroEdiaz
2024-12-03 22:51:50 -06:00
parent 7344c6bfcb
commit b2f6707efc

View File

@@ -1,3 +1,16 @@
#ifdef KLEIN_NORM_H
#error file included twice
#endif
#define KLEIN_NORM_H
#ifndef KLEIN_H
#warning Please include klein/klein.h
#endif
void klein_normalize(struct klein * klein);
#ifdef KLEIN_IMPLEMENT
static inline
void __calculate_normal( float *p1, float *p2, float *p3, float *normal, unsigned char n)
{ unsigned char i;
@@ -116,3 +129,4 @@ void klein_normalize(struct klein * klein)
free(norm_vec);
}
#endif