Struct flo_animation::PathPoint
[−]
[src]
pub struct PathPoint { pub position: (f32, f32), }
A point in a path
Fields
position: (f32, f32)
X, Y coordinates of this point
Methods
impl PathPoint
[src]
pub fn new(x: f32, y: f32) -> PathPoint
[src]
Creates a new path point
pub fn x(&self) -> f32
[src]
pub fn y(&self) -> f32
[src]
Trait Implementations
impl Clone for PathPoint
[src]
fn clone(&self) -> PathPoint
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for PathPoint
[src]
impl PartialEq for PathPoint
[src]
fn eq(&self, __arg_0: &PathPoint) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &PathPoint) -> bool
[src]
This method tests for !=
.
impl Debug for PathPoint
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Add<PathPoint> for PathPoint
[src]
type Output = PathPoint
The resulting type after applying the +
operator.
fn add(self, rhs: PathPoint) -> PathPoint
[src]
Performs the +
operation.
impl Sub<PathPoint> for PathPoint
[src]
type Output = PathPoint
The resulting type after applying the -
operator.
fn sub(self, rhs: PathPoint) -> PathPoint
[src]
Performs the -
operation.
impl Mul<f64> for PathPoint
[src]
type Output = PathPoint
The resulting type after applying the *
operator.
fn mul(self, rhs: f64) -> PathPoint
[src]
Performs the *
operation.
impl Coordinate for PathPoint
[src]
fn from_components(components: &[f64]) -> Self
[src]
Creates a new coordinate from the specified set of components
fn origin() -> Self
[src]
Returns the origin coordinate
fn len() -> usize
[src]
The number of components in this coordinate
fn get(&self, index: usize) -> f64
[src]
Retrieves the component at the specified index
fn from_biggest_components(p1: Self, p2: Self) -> Self
[src]
Returns a point made up of the biggest components of the two points
fn from_smallest_components(p1: Self, p2: Self) -> Self
[src]
Returns a point made up of the smallest components of the two points
fn distance_to(&self, target: &Self) -> f64
[src]
Computes the distance between this coordinate and another of the same type Read more
fn dot(&self, target: &Self) -> f64
[src]
Computes the dot product for this vector along with another vector Read more
fn magnitude(&self) -> f64
[src]
Computes the magnitude of this vector Read more
fn to_unit_vector(&self) -> Self
[src]
Treating this as a vector, returns a unit vector in the same direction Read more
fn is_nan(&self) -> bool
[src]
fn smooth(points: &[Self], weights: &[f64]) -> Vec<Self>
[src]
Generates a smoothed version of a set of coordinates, using the specified weights (weights should add up to 1.0). Read more