libreis  0.1.0
A simple header-based drop-in library
Data Structures | Macros | Functions
math.c File Reference

Functions for math operations. More...

#include <reis/math.h>

Data Structures

struct  Matrix
 

Macros

#define GOLDEN_RATIO   (1 + (sqrt(5))) / 2;
 
#define NEG_GOLDEN_RATIO   = (1 - (sqrt(5))) / 2;
 
#define bset(byte, nbit)   ((byte) |= (1<<(nbit)))
 
#define bclear(byte, nbit)   ((byte) &= ~(1<<(nbit)))
 
#define bflip(byte, nbit)   ((byte) ^= (1<<(nbit)))
 
#define bcheck(byte, nbit)   ((byte) & (1<<(nbit)))
 

Functions

Matrixcreate_matrix (int n_rows, int n_cols)
 
Matrixcopy_matrix (double *data, int n_rows, int n_cols)
 
void print_matrix (Matrix *mat)
 
int isNum (const char *str)
 
mat3 mat3_identity (void)
 
mat4 mat4_identity (void)
 
mat4 mat4_ortho (GLfloat left, GLfloat right, GLfloat bot, GLfloat top, GLfloat near, GLfloat far)
 

Detailed Description

Functions for math operations.

Author
yung-turabian
Date
12 3 2025