Giter Site home page Giter Site logo

weyrsdev / xo-math Goto Github PK

View Code? Open in Web Editor NEW

This project forked from daivuk/xo-math

0.0 2.0 0.0 2.45 MB

xo-math is an open source single header file module for optimized game math. C++11 or newer required.

Home Page: http://jaredthomson.com

C++ 97.19% JavaScript 1.67% C 1.13%

xo-math's Introduction

Build Status Documentation Status Maintenance MIT Licence Gitter

โš ๏ธ xo-math is currently in progress and not ready for production use.

xo-math

What is xo-math

xo-math is an open source single header file module for optimized game math. C++11 or newer required.

Mission

xo-math is designed to be as fast as possible on your target platform, and thoroughly tested for performance against other alternatives.

xo-math is designed to be future-looking. We push simd math past what currently adopted platforms support and build solutions for the up and coming.

xo-math is designed to be friendly. Easy to use and easy to understand, xo-math has built it's license and API for mere mortals to comprehend. You should be able to understand what we're all about in 10 minutes or less, drag and drop xo-math.h into your project and start coding in just minutes more.

If you feel I've failed my mission here, please let me know.

Quick Start

Download xo-math.h, xo-math.cpp and xo-math-config.h from the root of the repo, include them in your project and you're good to go.

#include <iostream>
#include "xo-math.h"

using namespace std;
using namespace xo;

int main() {
    
    Vector3 vec = Vector3::RandomOnConeRadians(Vector3::Up, HalfPI/2.0f);
    cout << "random 45 degree cone vector from Vector3::Up: " << vec << endl;

    if(vec == 1.0f) {
        cout << "The vector is normalized." << endl;
    }

    Matrix4x4 tilt = Matrix4x4::RotationXDegrees(-90.0f);
    tilt.Transform(vec);
    cout << "Now rotated -90 degrees by the x axis: " << vec << endl;

    float x, y, z;
    vec.Get(x, y, z);
    cout << "Extracted vector elements. x:" << x << " y:" << y << " z:" << z << endl;

    return 0;
}

Support

Here's what I know about compiler/platform support:

Compiler Name Version Supported?
clang++ >=3.3 Yes!
g++ >=4.8 Yes!
msvc >=2012 Yes!
apple llvm >=7.3 Yes!
apple llvm >=5 Probably?
intel >= 11.1 Unknown.***

For inquires about closed platform support such as PlayStation 4, XBox One and Wii: please get in touch.

*** You can help: I'm accepting donations for intel paralell studio to ensure proper support of this compiler by xo-math. The fundraiser is on crowdrise here.

Documentation

Documentation is hosted by Read The Docs: xo-math.rtfd.io

xo-math's People

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.