CMath is a simple math library for 2D and 3D programming. It contains implementations for:
- 2D vectors
- 3D vectors
- 4D vectors
- Quaternions
- Matrices
- Easing functions
Every structure and function uses float
, because it is the most used type on 2D and 3D programming with OpenGL.
Their structures are the same, however they have different functions.
Matrices are 4×4.
The easing functions are an implementation of the functions presented in easing.net.
- If you find any error, you can open an issue.
- You can request more useful functions in the issues regarding 2D vectors, 3D vectors, 4D vectors, quaternions and matrices. If you have already an implementation or know where to find, better.
The source code of this project is licensed under the terms of the ZLIB license:
Copyright (C) 2016 Felipe Ferreira da Silva
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
- This notice may not be removed or altered from any source distribution.