pub fn length(self) -> <<<T as Mul>::Output as Add>::Output as Sqrt>::Output
	where
		Self: Clone,
		T: Mul,
		T::Output: Add,
		<T::Output as Add>::Output: Sqrt,
	{
		self.length2().sqrt()
	}
/// Calculate the magnitude of the vector.
///
/// # Examples
/// Calculate the distance between two points.
/// ```
/// # extern crate airmash_protocol;
/// # use airmash_protocol::*;
/// # fn main() {
/// let a: Vector2<f32> = Vector2::new(4.0, 0.0);
/// let b: Vector2<f32> = Vector2::new(-4.0, 0.0);
///
/// // The distance is length of the vector going
/// // from b to a
/// let dist = (a - b).length();
///
/// # // This case should be ok for exact comparisons
/// assert_eq!(dist, 8.0);
/// # }
Calculate the magnitude of the vector.
Calculate the magnitude of the vector .
pub fn length(self) -> <<<T as Mul>::Output as Add>::Output as Sqrt>::Output
	where
		Self: Clone,
		T: Mul,
		T::Output: Add,
		<T::Output as Add>::Output: Sqrt,
	{
		self.length2().sqrt()
	}
pub fn length ( self ) -> < < < T as Mul > :: Output as Add > :: Output as Sqrt > :: Output where Self : Clone , T : Mul , T :: Output : Add , < T :: Output as Add > :: Output : Sqrt , { self . length2 ( ) . sqrt ( ) }
Calculate the magnitude of the vector.
Calculate the magnitude of the vector .
self
self
examples
Calculate the distance between two points.
Calculate the distance between two points .
extern crate airmash_protocol;
None
use airmash_protocol::*;
None
fn main() {


The distance is length of the vector going
from b to a
let dist = (a - b).length().
The distance is length of the vector going from b to a let dist = ( a - b ) . length () .
// this case should be ok for exact comparisons
None
}
None