Math2D RoamingGamer

What Is Math2D?

The math2d plugin is a collection of (natively coded) functions designed to solve the most common 2D math problems found in games. This collection is both fast and flexible, simplifying and speeding up Corona SDK in a real way.

The math2d plugin is designed to work with Corona SDK specifically. Like many of my libraries and modules, I created it for myself originally, but it was so useful I decided to make it available to others.

Don't strugle with 2D math any more. Get it now.

Where Can I Get It?

You can get the paid math2d plugin on the Corona SDK Marketplace.

Why Is This Paid?

Originally, I released a free version of the math2d plugin as a Pure-Lua solution. Since then, I have converted the library to a much faster (2x .. 6x) native version and added many new 2D math functions.

Click Benchmarks at the top of this page to see a comparison of math2d versus the legacy version.

You can get the old Pure-Lua version here, but be warned, it is much slower than the new version and is missing several key features: legacy math2d.

Basic Usage

Updating build.settings

math2d is a plugin and thus requires that you add it to the plugins section of build.settings as follows:

settings =
{
    plugins =
    {
        ["plugin.math2d"] = { publisherId = "com.roaminggamer" },
    },      
}

Using It

To include math2d in your project, simply add this line in main.lua:

local math2d = require "plugin.math2d"

Docs

Click the 'References' link at the top of this page for detailed documenation of the math2d functions.

Samples

If you want to see complete examples using math2d, you can download them here:

Requesting Help/Features

If you run into a bug, or have a feature request, you can contact me via the Corona Plugins Forum, using this format:

Title

Math2D Bug - Meaningful Description

-OR-

Math2D Feature Request - feature name here

Body

A clear, concise, and precise description of the feature you want including these details: