{"repo":"renehorstmann/Mathc","free":true,"listed":false,"github":"https://github.com/renehorstmann/Mathc","clone":"git clone https://github.com/renehorstmann/Mathc.git","description":"A simple and clean, glsl like, math (linear algebra) header only library for C.","language":"C","stars":17,"topics":["glsl","c","math","vector","matrix","header","header-only","linear-algebra"],"license":null,"category":"chat-messaging","readme_excerpt":"Mathc A simple and clean, glsl like, math (linear algebra) header only library for C. This is my old spatial lin alg library for C. My new engine \"Mia\" embeds its own math module, which in fact was initially Mathc but got a fresh cleanup. Ill left it here at github to show what I once coded. Getting Started Copy the header files into your project and have fun. The libraries are written in C11 (tested on GCC 9.3.0, MSVC). C++11 should also work (also tested with GCC 9.3.0, MSVC). Content - publictypes: definitions of the vector and matrix types (mathc vec3, mathc mat4, ...) - types: typedefs to publictypes (vec3, mat4, ...) - io: debug print for the types - vec: vector math - mat: matrix math - sca: scalar math (provides functions like min, max, clamp, ... for float, double, int, ...) - utils: some useful functions The Types There are multiple types for different sizes and value types: (sizes ( ): 2 - 4) - vec for float vectors - mat for float square matrices - dvec , dmat for double vectors / square matrices - ivec , imat for int vectors / square matrices - ucvec , ucmat for unsigned char vectors / square matrices - bvec for bool vectors Vector type usage: Vector type casting: All types can be casted from raw pointers. Functions, that operates on the types, normally have the type as prefix: vec3 Matrix type: The matrices are stored in column major order. Type implementation Vectors and matrices are defined as unions. With this convention (instead of passing pointers), vectors","default_branch":null,"files":null,"tree":[],"storefront":"/r/renehorstmann","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/renehorstmann/Mathc/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}