Skip to content

andrijko13/ajx-vector-math

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Version Build Status Contributions Welcome License

About

The ajx namespace provides classes for all basic linear algebra vector/matrix needs. Initially designed for use by game developers

Installing

Installing ajx and all of it's libraries is easy. Just make a build directory, and run cmake/make/make install!

mkdir build; cd build
cmake -j4 .. && make && make install

Building the project requires the system to have boost library installed, as well as a c++ compiler (g++)

Running Tests

You can run the test suite to make sure that the library is functioning. Individual tests can be found in /binaries/tests/.

To run the full test suite, you can use make test inside the build directory

Usage

Make sure to import the headers for the classes you are using, and use away! Examples are located in /src/examples

Once you compile the library, you can run the examples from the /binaries folder

#include <ajx/vec2d.h>
#include <iostream>

int main(int argc, char **argv) {
  ajx::vec2d <int> velocity1 (10, 10);
  ajx::vec2d <int> velocity2 (-15, 30);
  ajx::vec2d <int> result = velocity1 + velocity2;
  
  std::cout << "The added velocity is X: " << result.x() << " Y: " << result.y() << std::endl;
  
  return 0;
}

About

Class for mathematical vector/matrix classes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published