[−][src]Trait gdnative_core::Point2Godot
Helper methods for Point2
.
Trait used to provide additional methods that are equivalent to Godot's methods.
See the official Godot documentation
.
Required methods
fn angle_to_point(self, other: Point2) -> Angle
Returns the angle in radians between the line connecting the two points and the x coordinate.
fn direction_to(self, other: Point2) -> Vector2
Returns the normalized vector pointing from this point to other
.
fn distance_to(self, other: Point2) -> f32
Returns the distance to other
.
fn distance_squared_to(self, other: Point2) -> f32
Returns the squared distance to other
. Prefer this function over distance_to if you
need to sort points or need the squared distance for some formula.