Skip to content

Commit

Permalink
Merge #118
Browse files Browse the repository at this point in the history
118: Update to latest version of all dependencies r=kvark a=Vurich



<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/rustgd/collision-rs/118)
<!-- Reviewable:end -->


Co-authored-by: Jef <[email protected]>
  • Loading branch information
bors[bot] and eira-fransham authored May 4, 2021
2 parents 122169f + 95218b7 commit f233f67
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ keywords = ["gamedev", "cgmath", "collision"]
name = "collision"

[dependencies]
rand = "0.6"
approx = "0.3" # Only for the macros; for all other instances use the re-exported cgmath ones.
cgmath = "0.17"
rand = "0.8"
approx = "0.4" # Only for the macros; for all other instances use the re-exported cgmath ones.
cgmath = "0.18"
serde = { version = "1.0", optional = true, features = ["derive"] }
bit-set = "0.5"
smallvec = "0.6.1"
smallvec = "1.6"
num = { version = "0.3", optional = true, features = ["serde"] }

[target.'cfg(feature="serde")'.dependencies]
cgmath = { version = "0.17", features = ["serde"] }
num = { version = "0.2", features = ["serde"] }
[features]
use-serde = ["serde", "cgmath/serde", "num"]

[dev-dependencies]
genmesh = "0.5"
genmesh = "0.6"

2 changes: 1 addition & 1 deletion src/dbvt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ where

// Only do rotations occasionally, as they are fairly expensive, and shouldn't be overused.
// For most scenarios, the majority of shapes will not have moved, so this is fine.
if rand::thread_rng().gen_range(0, 100) < PERFORM_ROTATION_PERCENTAGE {
if rand::thread_rng().gen_range(0..100) < PERFORM_ROTATION_PERCENTAGE {
self.rotate(node_index);
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/bound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ extern crate collision;

use collision::PlaneBound;

fn _box(_: Box<PlaneBound<f32>>) {}
fn _box(_: Box<dyn PlaneBound<f32>>) {}

#[test]
fn bound_box() {}
6 changes: 3 additions & 3 deletions tests/dbvt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ extern crate cgmath;
extern crate collision;
extern crate rand;

use cgmath::{Deg, PerspectiveFov, Point2, Point3, Vector2, Vector3};
use cgmath::prelude::*;
use collision::{Aabb2, Aabb3, Frustum, Projection, Ray2, Relation};
use cgmath::{Deg, PerspectiveFov, Point2, Point3, Vector2, Vector3};
use collision::dbvt::*;
use collision::prelude::*;
use collision::{Aabb2, Aabb3, Frustum, Projection, Ray2, Relation};
use rand::Rng;

#[derive(Debug, Clone)]
Expand Down Expand Up @@ -122,7 +122,7 @@ fn test_add_20() {
let mut tree = DynamicBoundingVolumeTree::<Value2>::new();
let mut rng = rand::thread_rng();
for i in 0..20 {
let offset = rng.gen_range(-10., 10.);
let offset = rng.gen_range(-10f32..10f32);
tree.insert(Value2::new(
i,
aabb2(offset + 0.1, offset + 0.1, offset + 0.3, offset + 0.3),
Expand Down

0 comments on commit f233f67

Please sign in to comment.