Skip to main content

A basic math library for vectors and matrices

Project description

tiny_math

A basic math library for vectors and matrices (just for 2,3, and 4 dimensions)

Installation

C++

Use the provided CMakeLists.txt file:

mkdir -p build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j4 && make install

Python

Use the provided setup.py file:

python setup.py install

Usage

C++

#include <vector_t.h>

int main()
{
    // Create a vec3-float32 and show it on the console
    auto vec = tinymath::Vector3f( { 1.0f, 2.0f, 3.0f } );
    std::cout << "vec: " << tinymath::toString( vec ) << std::endl;

    return 0;
}

Python

import tinymath as tm

# Create a vec3-float32 and show it on the console
vec = tm.Vector3f( [1.0, 2.0, 3.0] )
print( 'vec: {}'.format( vec ) )

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wp-tinymath-0.0.1.tar.gz (54.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page