Get cgmath building in beta by removing remaining unstable feature use. Benching is unstable and therefore only available on nightly; removed from travis in the interim.
This commit is contained in:
parent
e63ce6f9e2
commit
a058142a2c
5 changed files with 7 additions and 5 deletions
|
@ -22,7 +22,6 @@ env:
|
|||
script:
|
||||
- cargo build
|
||||
- cargo test
|
||||
- cargo bench
|
||||
- cargo doc
|
||||
after_script:
|
||||
# the doc directory needs to be in the root for rust-ci
|
||||
|
|
|
@ -276,10 +276,11 @@ impl<S: BaseFloat> One for Deg<S> {
|
|||
fn one() -> Deg<S> { deg(one()) }
|
||||
}
|
||||
|
||||
const PI_2: f64 = f64::consts::PI * 2f64;
|
||||
impl<S: BaseFloat>
|
||||
Angle<S> for Rad<S> {
|
||||
#[inline] fn from<A: Angle<S>>(theta: A) -> Rad<S> { theta.to_rad() }
|
||||
#[inline] fn full_turn() -> Rad<S> { rad(cast(f64::consts::PI_2).unwrap()) }
|
||||
#[inline] fn full_turn() -> Rad<S> { rad(cast(PI_2).unwrap()) }
|
||||
}
|
||||
|
||||
impl<S: BaseFloat>
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
|
||||
#![crate_type = "rlib"]
|
||||
#![crate_type = "dylib"]
|
||||
#![feature(plugin, core, custom_derive)]
|
||||
|
||||
//! Computer graphics-centric math.
|
||||
//!
|
||||
|
|
|
@ -133,7 +133,6 @@ pub trait Rotation3<S: BaseNum>: Rotation<S, Vector3<S>, Point3<S>>
|
|||
/// matrix:
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(core)]
|
||||
/// use cgmath::rad;
|
||||
/// use cgmath::Vector2;
|
||||
/// use cgmath::{Matrix, ToMatrix2};
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
// limitations under the License.
|
||||
|
||||
use std::fmt;
|
||||
use std::marker::PhantomFn;
|
||||
|
||||
use rust_num::{zero, one};
|
||||
|
||||
|
@ -237,7 +238,10 @@ impl<S: BaseFloat + 'static> Transform3<S> for AffineMatrix3<S> {}
|
|||
|
||||
/// A trait that allows extracting components (rotation, translation, scale)
|
||||
/// from an arbitrary transformations
|
||||
pub trait ToComponents<S, V: Vector<S>, P: Point<S, V>, R: Rotation<S, V, P>> {
|
||||
// PhantomFn works around a beta bug in deteriming the usage of S/P, and should be safely removed
|
||||
// when PhantomFn deprecation lands in stable.
|
||||
pub trait ToComponents<S: BaseNum, V: Vector<S>, P: Point<S, V>, R: Rotation<S, V, P>>
|
||||
: PhantomFn<S> + PhantomFn<P> {
|
||||
/// Extract the (scale, rotation, translation) triple
|
||||
fn decompose(&self) -> (V, R, V);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue