mod nostd;
mod trigonometry;
use self::trigonometry::{atan2, cos_deg, cos_rad, sin_deg, sin_rad};
use crate::graphics::IndiceType;
pub trait Float {
fn sin_deg_fast(self) -> Self;
fn sin_rad_fast(self) -> Self;
fn cos_deg_fast(self) -> Self;
fn cos_rad_fast(self) -> Self;
fn atan2_fast(self, x: f32) -> Self;
fn inv_sqrt(self) -> Self;
fn perceptual(self) -> Self;
}
pub trait UnsignedInteger: Copy + Clone {
const INDICE_TYPE: IndiceType;
}
impl UnsignedInteger for u8 {
const INDICE_TYPE: IndiceType = IndiceType::UnsignedByte;
}
impl UnsignedInteger for u16 {
const INDICE_TYPE: IndiceType = IndiceType::UnsignedShort;
}
impl UnsignedInteger for u32 {
const INDICE_TYPE: IndiceType = IndiceType::UnsignedInt;
}