[−][src]Trait tokyo::geom::PointExt
Extension methods for the Point
type alias.
Required methods
Loading content...Provided methods
fn distance(&self, other: &dyn PointExt) -> f32
Returns the distance between this and the given points.
fn angle_to(&self, other: &dyn PointExt) -> Radian
Returns the angle of the line connecting this point to the given point.
fn velocity_to(&self, other: &dyn PointExt, dt: Duration) -> Vector
Returns the velocity at which one travels from this point to the given
point for the amount of time dt
.
fn project(&self, velocity: &Vector, dt: Duration) -> Point
Returns the projection of this position along the given velocity
(pixels-per-second) for the amount of time dt
.
Implementors
impl PointExt for Bullet
[src]
Bullet
struct provides some basic geometry operations through PointExt
trait. See the geom
mod.
fn point(&self) -> &Point
[src]
fn distance(&self, other: &dyn PointExt) -> f32
[src]
fn angle_to(&self, other: &dyn PointExt) -> Radian
[src]
fn velocity_to(&self, other: &dyn PointExt, dt: Duration) -> Vector
[src]
fn project(&self, velocity: &Vector, dt: Duration) -> Point
[src]
impl PointExt for Player
[src]
Player
struct provides some basic geometry operations through PointExt
trait. See the geom
mod.