aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
blob: 50d0435fa5866e2aca2075e6105d2864c634f801 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
pub mod core;
pub mod camera;
pub mod render;
pub mod scene;

use std::ops::{Add, Sub, Mul, DivAssign};
use std::cmp;
use std::fmt;

/// Trait used to implement generics
///
/// This is used in Bound and Vectors
pub trait Number:
    Copy +
    cmp::PartialOrd +
    Sub<Output = Self> +
    Add<Output = Self> +
    Mul<Output = Self> +
    DivAssign +
    fmt::Display
{}

impl Number for i32 {}
impl Number for f32 {}

/// Used for representing floating point values throughout the program
/// 
/// A higher precision type will require more ram
pub type Float = f32;