[−][src]Type Definition tokyo::geom::Point
type Point = Point2D<f32>;
A point inside the game arena, in terms of pixels. See euclid
documentation
for its API, but you can assume all the basic linear algebra operations are
supported e.g. addition, subtraction, and interpolation (aka lerp
).
Trait Implementations
impl PointExt for Point
[src]
fn point(&self) -> &Point
[src]
fn distance(&self, other: &dyn PointExt) -> f32
[src]
Returns the distance between this and the given points.
fn angle_to(&self, other: &dyn PointExt) -> Radian
[src]
Returns the angle of the line connecting this point to the given point.
fn velocity_to(&self, other: &dyn PointExt, dt: Duration) -> Vector
[src]
Returns the velocity at which one travels from this point to the given point for the amount of time dt
. Read more
fn project(&self, velocity: &Vector, dt: Duration) -> Point
[src]
Returns the projection of this position along the given velocity
(pixels-per-second) for the amount of time dt
. Read more