Remove 'static constraints
These seem to be relics from an older Rust...
This commit is contained in:
parent
4c62ef4efb
commit
a02b94fb70
3 changed files with 5 additions and 6 deletions
|
@ -63,7 +63,6 @@ partial_ord_float!(f64);
|
|||
pub trait BaseNum:
|
||||
Copy + NumCast + Clone + Num
|
||||
+ PartialOrd + cmp::PartialOrd + fmt::Debug
|
||||
+ 'static
|
||||
{}
|
||||
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ use num::BaseFloat;
|
|||
///
|
||||
/// This is the equivalent to the [gluPerspective]
|
||||
/// (http://www.opengl.org/sdk/docs/man2/xhtml/gluPerspective.xml) function.
|
||||
pub fn perspective<S: BaseFloat + 'static, A: Angle<S>>(fovy: A, aspect: S, near: S, far: S) -> Matrix4<S> {
|
||||
pub fn perspective<S: BaseFloat, A: Angle<S>>(fovy: A, aspect: S, near: S, far: S) -> Matrix4<S> {
|
||||
PerspectiveFov {
|
||||
fovy: fovy,
|
||||
aspect: aspect,
|
||||
|
@ -37,7 +37,7 @@ pub fn perspective<S: BaseFloat + 'static, A: Angle<S>>(fovy: A, aspect: S, near
|
|||
///
|
||||
/// This is the equivalent of the now deprecated [glFrustrum]
|
||||
/// (http://www.opengl.org/sdk/docs/man2/xhtml/glFrustum.xml) function.
|
||||
pub fn frustum<S: BaseFloat + 'static>(left: S, right: S, bottom: S, top: S, near: S, far: S) -> Matrix4<S> {
|
||||
pub fn frustum<S: BaseFloat>(left: S, right: S, bottom: S, top: S, near: S, far: S) -> Matrix4<S> {
|
||||
Perspective {
|
||||
left: left,
|
||||
right: right,
|
||||
|
@ -52,7 +52,7 @@ pub fn frustum<S: BaseFloat + 'static>(left: S, right: S, bottom: S, top: S, nea
|
|||
///
|
||||
/// This is the equivalent of the now deprecated [glOrtho]
|
||||
/// (http://www.opengl.org/sdk/docs/man2/xhtml/glOrtho.xml) function.
|
||||
pub fn ortho<S: BaseFloat + 'static>(left: S, right: S, bottom: S, top: S, near: S, far: S) -> Matrix4<S> {
|
||||
pub fn ortho<S: BaseFloat>(left: S, right: S, bottom: S, top: S, near: S, far: S) -> Matrix4<S> {
|
||||
Ortho {
|
||||
left: left,
|
||||
right: right,
|
||||
|
@ -143,7 +143,7 @@ pub struct Perspective<S> {
|
|||
pub far: S,
|
||||
}
|
||||
|
||||
impl<S: BaseFloat + 'static> From<Perspective<S>> for Matrix4<S> {
|
||||
impl<S: BaseFloat> From<Perspective<S>> for Matrix4<S> {
|
||||
fn from(persp: Perspective<S>) -> Matrix4<S> {
|
||||
assert!(persp.left <= persp.right, "`left` cannot be greater than `right`, found: left: {:?} right: {:?}", persp.left, persp.right);
|
||||
assert!(persp.bottom <= persp.top, "`bottom` cannot be greater than `top`, found: bottom: {:?} top: {:?}", persp.bottom, persp.top);
|
||||
|
|
|
@ -359,7 +359,7 @@ impl<S: BaseFloat> Rotation<Point3<S>> for Quaternion<S> {
|
|||
fn invert_self(&mut self) { *self = self.invert() }
|
||||
}
|
||||
|
||||
impl<S: BaseFloat> Rotation3<S> for Quaternion<S> where S: 'static {
|
||||
impl<S: BaseFloat> Rotation3<S> for Quaternion<S> {
|
||||
#[inline]
|
||||
fn from_axis_angle(axis: Vector3<S>, angle: Rad<S>) -> Quaternion<S> {
|
||||
let (s, c) = sin_cos(angle.mul_s(cast(0.5f64).unwrap()));
|
||||
|
|
Loading…
Reference in a new issue