Code Monkey home page Code Monkey logo

quaternionsandcomplexnumbers's Introduction

QuaternionsAndComplexNumbers

A rust module for when you want to use Complex Numbers or Quaternions for whatever reason. :) Made for fun, maybe not the best choice for actual production (for now).

Run

Run cargo run on your console within the "ComplexNumbers" folder

Features

Create ComplexNumber (a + bi) and Quaternion (a + bi + cj + dk) objects and execute different operations with them

Some examples:

For ComplexNumber:

create a complex number using "let n = ComplexNumber::new() (= 0 + 0i)" or the macro "let n = complex!(a, b)"
multiply/add/substract complex numbers using the usual "*" operator
obtain the conjugate or the norm of a complex number using the corescponding method (conjugate(), norm())
print the numbers using either the normal macro "println!("{}", n)" or with the method "cprint()"
etc.

For Quaternion:

mostly the same stuff but implemented for the case of quaternions :3

quaternionsandcomplexnumbers's People

Contributors

kickhead13 avatar

Watchers

 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.