Merge pull request #29 from bjz/travis
Call rustc directly in .travis.yml
This commit is contained in:
commit
f3fdee9e9c
11 changed files with 7 additions and 5 deletions
|
@ -1 +0,0 @@
|
|||
`find build -name benchbench` --bench
|
|
@ -4,6 +4,9 @@ before_install:
|
|||
install:
|
||||
- sudo apt-get install rust-nightly
|
||||
script:
|
||||
- rustpkg test tests
|
||||
- rustpkg build --opt-level=3 bench
|
||||
- sh .travis.sh
|
||||
- mkdir -p lib bin
|
||||
- rustc --out-dir lib ./src/cgmath/lib.rs
|
||||
- rustc --out-dir bin --test -L ./lib ./src/test/test.rs
|
||||
- rustc --out-dir bin --test -L ./lib ./src/bench/bench.rs
|
||||
- ./bin/test
|
||||
# - ./bin/bench --bench
|
||||
|
|
|
@ -41,7 +41,7 @@ impl<S: Float> Intersect<Option<Point3<S>>> for (Sphere<S>, Ray3<S>) {
|
|||
let tca = l.dot(&r.direction);
|
||||
if tca < cast(0.0) { return None; }
|
||||
let d2 = l.dot(&l) - tca*tca;
|
||||
if (d2 > s.radius*s.radius) { return None; }
|
||||
if d2 > s.radius*s.radius { return None; }
|
||||
let thc = num::sqrt(s.radius*s.radius - d2);
|
||||
Some(r.origin.add_v(&r.direction.mul_s(tca - thc)))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue