rust/hwphysics/src/collision.rs
changeset 15270 7446258fab98
parent 15266 b58f98bbc120
child 15274 42b710b0f883
equal deleted inserted replaced
15269:96fbf9bb960a 15270:7446258fab98
     9 use fpnum::*;
     9 use fpnum::*;
    10 use integral_geometry::{GridIndex, Point, Size};
    10 use integral_geometry::{GridIndex, Point, Size};
    11 use land2d::Land2D;
    11 use land2d::Land2D;
    12 
    12 
    13 pub fn fppoint_round(point: &FPPoint) -> Point {
    13 pub fn fppoint_round(point: &FPPoint) -> Point {
    14     Point::new(point.x().round() as i32, point.y().round() as i32)
    14     Point::new(point.x().round(), point.y().round())
    15 }
    15 }
    16 
    16 
    17 #[derive(PartialEq, Eq, Clone, Copy, Debug)]
    17 #[derive(PartialEq, Eq, Clone, Copy, Debug)]
    18 pub struct CircleBounds {
    18 pub struct CircleBounds {
    19     pub center: FPPoint,
    19     pub center: FPPoint,