Scrappy Maths is a simple maths library for Solar2D that includes a bunch of common methods.
As with all my plugins it is free to use however if you find it useful, and are able to, I’d appreciate a coffee.
Image Credit: whiteboard by ProSymbols from the Noun Project.
There are multiple ways to include the library in your project, the simplest is probably via the plugin, as outlined below, however if you wish you can also access the source code.
build.settings
settings = { plugins = { ["plugin.scrappyMaths"] = { publisherId = "com.scrappyferret", supportedPlatforms = { iphone = { url="https://plugins.scrappyferret.com/scrappyMaths/iphone.tgz" }, android = { url="https://plugins.scrappyferret.com/scrappyMaths/android.tgz" }, macos = false, win32 = false }, }, }, }
main.lua
require( "plugin.scrappyMaths" )
If you wish you to access the source code directly it is available on GitLab here.
You can then clone or fork it if you wish, or add the library as a submodule to your project with this command:
git submodule add https://gitlab.com/scrappyferret-libs/scrappy-maths.git maths
However you get the source code into your project, you will then need to include it.
main.lua
require( "maths.core" )