ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - crertel/graphmath: An Elixir library for performing 2D and 3D mathematics.
An Elixir library for performing 2D and 3D mathematics. - crertel/graphmath
Visit Site

GitHub - crertel/graphmath: An Elixir library for performing 2D and 3D mathematics.

GitHub - crertel/graphmath: An Elixir library for performing 2D and 3D mathematics.

CircleCI Inline docs hex.pm version hex.pm downloads Coverage Status

What is graphmath?

Graphmath is a library for handling common 2D and 3D operations, usually with an eye towards vector arithmetic for graphics and simulation.

It's designed to be comfortable to use, reasonably fast, and something which will benefit game developers and graphics programmers, though it may also be useful for robotocists and anyone attempting large-scale simluations which exist in R2 or R3.

Features

  • Support for vectors in R2 and R3.
  • Support for 3x3 and 4x4 matrices.
  • Support for quaternions
  • Addition, subtraction
  • Element-wise multiplication
  • Scalar multiplication
  • Inner-products (dot product)
  • Cross products
  • Projection
  • Normalization
  • Comparison
  • Rotation
  • Linear interpolation
  • Matrix inversion
  • Tuples are used to represent vectors and matrices (faster than lists or structs)

Installation

This package is available from the hex package manager.

Just add it to your mix.exs file like so:

  def project do
    [app: myapp,
     version: "x.y.z",
     elixir: "~> 1.0",
     description: "description",
     package: ...,
     deps: [
        ...,
        {:graphmath, "~> 1.0.2" },
        ...
        ] ]
  end

Conventions in library

All mathematics are done in a right-handed coordinate system--that is to say, +Z is the cross-product of +X with +Y.

All operations are accompanied by tests and documentation.

Contributing

Issues

  1. Open an issue on Github.

For developers

  1. Fork this project on Github.

  2. Open an issue for your proposed changes.

  3. Add tests for your new functionality, if applicable.

  4. Add documentation for your functionality, if applicable. NO DOCS -> NO MERGE.

  5. Submit a pull request.

  6. Bask in the glory of having helped create content on one of the best platforms ever devised.

For non-developers

  1. Buy me a beer if you see me at ElixirConf.

Wishlist

  • C/SIMD native extensions (probably want to live in a different, API-compatible library).

  • Left-handed coordinate system support (don't care enough right now, but some interop would appreciate it).

  • Functions to convert to packed 32-bit and 64-bit float byte arrays.

License

This project is put into the public domain under the unlicense.

If you can't use that, consider it under the WTFPL.

If you can't use that, fine--use the new BSD license.

Contributors

  • Chris Ertel
  • Ivan Miranda
  • Matthew Philyaw

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory