Fixed the library to use the new Rust 2018 module system.
This commit is contained in:
parent
46f1bcafca
commit
097d9df847
@ -7,6 +7,7 @@ license = ""
|
|||||||
repository = "https://gitlab.com/CyberMages/Core/sigils.git"
|
repository = "https://gitlab.com/CyberMages/Core/sigils.git"
|
||||||
documentation = ""
|
documentation = ""
|
||||||
keywords = ["sigils"]
|
keywords = ["sigils"]
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
|
||||||
[dependencies.weave]
|
[dependencies.weave]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use ::number::Number;
|
use crate::number::Number;
|
||||||
use ::one::One;
|
use crate::one::One;
|
||||||
use ::zero::Zero;
|
use crate::zero::Zero;
|
||||||
|
|
||||||
|
|
||||||
/// A trait that defines what is required to be considered
|
/// A trait that defines what is required to be considered
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
//! This module defines the 2x2, 3x3, and 4x4 Matrix structures.
|
//! This module defines the 2x2, 3x3, and 4x4 Matrix structures.
|
||||||
use std::ops::{Add, Sub, Mul, Div, Rem, Neg};
|
use std::ops::{Add, Sub, Mul, Div, Rem, Neg};
|
||||||
|
|
||||||
use ::zero::Zero;
|
use crate::zero::Zero;
|
||||||
use ::one::One;
|
use crate::one::One;
|
||||||
use ::number::Number;
|
use crate::number::Number;
|
||||||
use ::vector::{Vector, Vector2, Vector3, Vector4};
|
use crate::vector::{Vector, Vector2, Vector3, Vector4};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// A trait that defines the minimum set of
|
/// A trait that defines the minimum set of
|
||||||
|
@ -7,8 +7,8 @@ use std::str::FromStr;
|
|||||||
|
|
||||||
use weave::Bounded;
|
use weave::Bounded;
|
||||||
|
|
||||||
use ::zero::Zero;
|
use crate::zero::Zero;
|
||||||
use ::one::One;
|
use crate::one::One;
|
||||||
|
|
||||||
|
|
||||||
/// A trait that defines what is required to be considered
|
/// A trait that defines what is required to be considered
|
||||||
|
@ -6,12 +6,13 @@
|
|||||||
use std::fmt::{Error, Formatter, Debug, Display};
|
use std::fmt::{Error, Formatter, Debug, Display};
|
||||||
use std::ops::{Add, Sub, Mul, Div, Neg};
|
use std::ops::{Add, Sub, Mul, Div, Neg};
|
||||||
|
|
||||||
use ::zero::Zero;
|
use crate::zero::Zero;
|
||||||
use ::one::One;
|
use crate::one::One;
|
||||||
use ::real::Real;
|
use crate::real::Real;
|
||||||
use ::trig::Radian;
|
use crate::trig::Radian;
|
||||||
use ::trig::Trig;
|
use crate::trig::Trig;
|
||||||
use ::vector::{Vector, EuclideanVector, Vector3};
|
use crate::vector::{Vector, EuclideanVector, Vector3};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// A Quaternion is a combination of a scalar and a vector
|
/// A Quaternion is a combination of a scalar and a vector
|
||||||
|
@ -3,10 +3,10 @@ use std::ops::Neg;
|
|||||||
|
|
||||||
use binding::{CDouble, CFloat, CInt};
|
use binding::{CDouble, CFloat, CInt};
|
||||||
|
|
||||||
use ::constants::Constants;
|
use crate::constants::Constants;
|
||||||
use ::number::Number;
|
use crate::number::Number;
|
||||||
use ::one::One;
|
use crate::one::One;
|
||||||
use ::zero::Zero;
|
use crate::zero::Zero;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
use std::ops::{Add, Sub, Mul, Div, Rem, Neg};
|
use std::ops::{Add, Sub, Mul, Div, Rem, Neg};
|
||||||
use std::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign};
|
use std::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign};
|
||||||
|
|
||||||
use ::constants::Constants;
|
use crate::constants::Constants;
|
||||||
use ::real::Real;
|
use crate::real::Real;
|
||||||
use ::trig::radian::Radian;
|
use crate::trig::radian::Radian;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
use std::ops::{Add, Sub, Mul, Div, Rem, Neg};
|
use std::ops::{Add, Sub, Mul, Div, Rem, Neg};
|
||||||
use std::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign};
|
use std::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign};
|
||||||
|
|
||||||
use ::constants::Constants;
|
use crate::constants::Constants;
|
||||||
use ::real::Real;
|
use crate::real::Real;
|
||||||
use ::trig::degree::Degree;
|
use crate::trig::degree::Degree;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// A unit of angle, equal to an angle at the center of
|
/// A unit of angle, equal to an angle at the center of
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use binding::{CDouble, CFloat};
|
use binding::{CDouble, CFloat};
|
||||||
|
|
||||||
use ::real::Real;
|
use crate::real::Real;
|
||||||
use ::trig::radian::Radian;
|
use crate::trig::radian::Radian;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,12 +5,14 @@ use std::fmt::{Error, Formatter, Debug, Display};
|
|||||||
use std::ops::{Add, Sub, Mul, Div, Rem, Neg};
|
use std::ops::{Add, Sub, Mul, Div, Rem, Neg};
|
||||||
use std::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign};
|
use std::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign};
|
||||||
|
|
||||||
use ::zero::Zero;
|
use weave::attempt;
|
||||||
use ::one::One;
|
|
||||||
use ::number::Number;
|
use crate::zero::Zero;
|
||||||
use ::real::Real;
|
use crate::one::One;
|
||||||
use ::trig::Radian;
|
use crate::number::Number;
|
||||||
use ::trig::Trig;
|
use crate::real::Real;
|
||||||
|
use crate::trig::Radian;
|
||||||
|
use crate::trig::Trig;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -548,12 +550,12 @@ macro_rules! define_vector
|
|||||||
// pretty up the printing.
|
// pretty up the printing.
|
||||||
count = self.get_size();
|
count = self.get_size();
|
||||||
|
|
||||||
try!(write!(formatter, "<"));
|
attempt!(write!(formatter, "<"));
|
||||||
$(
|
$(
|
||||||
try!(write!(formatter, "{:?}", self.$field));
|
attempt!(write!(formatter, "{:?}", self.$field));
|
||||||
if count > 0
|
if count > 0
|
||||||
{
|
{
|
||||||
try!(write!(formatter, ", "));
|
attempt!(write!(formatter, ", "));
|
||||||
}
|
}
|
||||||
count -= 1;
|
count -= 1;
|
||||||
)*
|
)*
|
||||||
@ -573,12 +575,12 @@ macro_rules! define_vector
|
|||||||
// pretty up the printing.
|
// pretty up the printing.
|
||||||
count = self.get_size();
|
count = self.get_size();
|
||||||
|
|
||||||
try!(write!(formatter, "<"));
|
attempt!(write!(formatter, "<"));
|
||||||
$(
|
$(
|
||||||
try!(write!(formatter, "{}", self.$field));
|
attempt!(write!(formatter, "{}", self.$field));
|
||||||
if count > 1
|
if count > 1
|
||||||
{
|
{
|
||||||
try!(write!(formatter, ", "));
|
attempt!(write!(formatter, ", "));
|
||||||
}
|
}
|
||||||
count -= 1;
|
count -= 1;
|
||||||
)*
|
)*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user