[proxy] web.archive.org← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light

dcodeIO/JustMath.js

An implementation of two dimensional vector math including a rich toolset for vector operations. It's also the math library behind eSoccer, a cross-platform multiplayer HTML5 game developed at University of Applied Sciences Bonn.

JustMath.Vec2

Features

Usage

Node.js / CommonJS

var JustMath = require("justmath"),
    Vec2 = JustMath.Vec2;
var a = new Vec2(1,2);
console.log("Not more than "+a.x+", "+a.y+", 3.");

Browser (shim)

<script src="//raw.github.com/dcodeIO/JustMath.js/master/JustMath.min.js"></script>
var JustMath = dcodeIO.JustMath,
    Vec2 = JustMath.Vec2;
var a = new Vec2(1,2);
alert("Not more than "+a.x+", "+a.y+", 3.");

RequireJS / AMD

var JustMath = require("/path/to/JustMath.js"),
    Vec2 = JustMath.Vec2;
var a = new Vec2(1,2);
alert("Not more than "+a.x+", "+a.y+", 3.");

Downloads

Documentation

Examples & Tests

License

Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.html