[][src]Trait gdnative_core::core_types::vector3::Vector3Godot

pub trait Vector3Godot {
    fn direction_to(self, other: Vector3) -> Vector3;
fn distance_to(self, other: Vector3) -> f32;
fn distance_squared_to(self, other: Vector3) -> f32; }

Helper methods for Vector3.

Trait used to provide additional methods that are equivalent to Godot's methods. See the official Godot documentation.

Required methods

fn direction_to(self, other: Vector3) -> Vector3

Internal API for converting to sys representation. Makes it possible to remove transmutes elsewhere. Returns the normalized vector pointing from this vector to other.

fn distance_to(self, other: Vector3) -> f32

Returns the distance to other.

fn distance_squared_to(self, other: Vector3) -> f32

Returns the squared distance to other.

This method runs faster than distance_to, so prefer it if you need to compare vectors or need the squared distance for some formula.

Loading content...

Implementors

impl Vector3Godot for Vector3[src]

Loading content...