| dropMath is a simple single header math library intended to be used in games. |
|---|
⭐ We are looking for more developers. Feel free to contribute!
dropMath is a single header C++ math library with a primary focus on ease of use.
The main target audience for this library are game developers who want to have a modern C++ interface for the math library they are using.
The preferred method of installing this library is through the cpm package manager that you can find here:
Once you have CPM "installed" you can use dropMath like so:
CPMAddPackage("gh:Erarnitox/dropMath#main")
target_link_libraries(your_executable PRIVATE dropMath::dropMath)You can also install the library using the CMake built in function FetchContent directly, without using a package manager like so:
include(FetchContent)
FetchContent_Declare(
dropMath
GIT_REPOSITORY https://github.com/Erarnitox/dropMath.git
GIT_TAG main
GIT_PROGRESS TRUE
)
FetchContent_MakeAvailable(dropMath)
target_link_libraries(your_executable PRIVATE dropMath::dropMath)To install and use dropMath, and you are not using CMake, you only need to include the header (header/dropMath) in this repository.
In your project directory run:
wget https://raw.githubusercontent.com/DropSoftCommunity/dropMath/main/dropMath.hppYou should now have the header file dropMath.hpp in your project directory.
You should now be able to include the header from the same directory in your source files like this:
#include "dropMath.hpp" //include dropMath
int main(){
/*Drop Math can now be used.
As an example I just created a Vector3 here
*/
drop::math::Vector3 vec{ 1.f, 2.f, 3.f };
//...
return 0;
}You can find some example usage of the library in the examples directory of this repository.
We do also have a YouTube Playlist with usage examples:
![]()
Discord: @erarnitox
X: @erarnitox
