oxygen_quark/
lib.rs

1//! # Summary
2//! Oxygen Quark is a maths library primarily aimed for the Oxygen game engine.
3//! Use for it in any other project is allowed and encouraged.
4//!
5//! - It holds parts of linear algebra: [square matrices](./matrix/index.html) along [two-dimensional](./vector/vector2d/struct.Vector2D.html) and [three-dimensional vectors](./vector/vector3d/struct.Vector3D.html).
6//! - It is also containing a [`Fraction`](./fraction/struct.Fraction.html) data-type to allow for more precise calculations when floating-point is proven inaccurate.
7//! - The last part is the imaginary part, holding [`Quaternion`](./imaginary/quaternion/struct.Quaternion.html) as well as [`Complex`](./imaginary/complex/struct.Complex.html) data-types, one for three-dimensional rotations
8//! and the other for mathematical completeness.
9
10//! ## Vector
11//! The module containing the implementation details for [`Vector2d`](./vector/vector2d/struct.Vector2D.html) and [`Vector3d`](./vector/vector3d/struct.Vector3D.html).
12
13//! ## Matrix
14//! This module holds the implementations of [`Matrix2x2`](./matrix/matrix2x2/struct.Matrix2x2.html), [`Matrix3x3`](./matrix/matrix3x3/struct.Matrix3x3.html) and [`Matrix4x4`](./matrix/matrix4x4/struct.Matrix4x4.html).
15
16//! ## Imaginary
17//! This module contains [`Complex`](./imaginary/complex/struct.Complex.html) and [`Quaternion`](./imaginary/quaternion/struct.Quaternion.html) implementations.
18
19//! ## Fraction
20//! This module yields the implementation for [`Fraction`](./fraction/struct.Fraction.html).
21
22extern crate oxygen_quark_derive;
23
24pub mod prelude;
25
26// Linear algebra
27/// Holds the implementations for `Matrix2x2`, `Matrix3x3` and `Matrix4x4`.
28pub mod matrix;
29/// Holds the implementations for `Vector2d` and `Vector3d`.
30pub mod vector;
31
32// Complex numbers
33/// Holds the implementations for `Complex` and `Quaternion`.
34pub mod imaginary;
35
36// Fractions
37/// Holds the implementation for the `Fraction` data-type.
38pub mod fraction;
39
40// Colours
41// Holds the implementation for the `Colour` data-type.
42pub mod colour;
43
44pub fn info() {
45    println!(
46        "You are running {} v.{}",
47        env!("CARGO_PKG_NAME"),
48        env!("CARGO_PKG_VERSION")
49    );
50    println!("Find more on {}", env!("CARGO_PKG_HOMEPAGE"));
51}