orca/src/util/algebra.h

35 lines
811 B
C
Raw Normal View History

2023-09-07 12:51:48 +00:00
/*************************************************************************
*
2023-09-07 12:51:48 +00:00
* Orca
* Copyright 2023 Martin Fouilleul and the Orca project contributors
* See LICENSE.txt for licensing information
*
2023-09-07 12:51:48 +00:00
**************************************************************************/
#ifndef __ALGEBRA_H_
#define __ALGEBRA_H_
2023-08-19 12:49:23 +00:00
#include "typedefs.h"
2023-09-11 14:48:26 +00:00
#ifdef __cplusplus
extern "C" {
#endif
bool oc_vec2_equal(oc_vec2 v0, oc_vec2 v1);
oc_vec2 oc_vec2_mul(f32 f, oc_vec2 v);
oc_vec2 oc_vec2_add(oc_vec2 v0, oc_vec2 v1);
oc_vec2 oc_mat2x3_mul(oc_mat2x3 m, oc_vec2 p);
oc_mat2x3 oc_mat2x3_mul_m(oc_mat2x3 lhs, oc_mat2x3 rhs);
oc_mat2x3 oc_mat2x3_inv(oc_mat2x3 x);
oc_mat2x3 oc_mat2x3_rotate(f32 radians);
oc_mat2x3 oc_mat2x3_translate(f32 x, f32 y);
//TODO: complete
2023-09-11 14:48:26 +00:00
#ifdef __cplusplus
}
#endif
#endif //__ALGEBRA_H_