pub fn new<X>(x: X, y: X) -> Self
	where
		X: Into<T>,
	{
		Self {
			x: x.into(),
			y: y.into(),
		}
	}
/// Create a new vector with components that convert
/// into the vectors types.
///
/// This is easier to use when creating a vector
/// from components, but it may prevent type inference
/// when the vector type is not specified.
///
/// # Example
/// ```
/// # extern crate airmash_protocol;
/// # use airmash_protocol::*;
/// # fn main() {
/// // Note that this is the same as Position
/// let vec: Vector2<Distance> = Vector2::new(0.0, 0.0);
/// # }
/// ```
Create a new vector with components that convert
into the vectors types.

This is easier to use when creating a vector
from components, but it may prevent type inference
when the vector type is not specified.
Create a new vector with components that convert into the vectors types . This is easier to use when creating a vector from components but it may prevent type inference when the vector type is not specified .
pub fn new<X>(x: X, y: X) -> Self
	where
		X: Into<T>,
	{
		Self {
			x: x.into(),
			y: y.into(),
		}
	}
pub fn new < X > ( x : X , y : X ) -> Self where X : Into < T > , { Self { x : x . into ( ) , y : y . into ( ) , } }
Create a new vector with components that convert
into the vectors types.
Create a new vector with components that convert into the vectors types .
x
X
y
X
x
X
y
X
example
None
extern crate airmash_protocol;
None
use airmash_protocol::*;
None
fn main() {
Note that this is the same as Position
let vec: Vector2 = Vector2::new(0.0, 0.0).
Note that this is the same as Position let vec : Vector2 = Vector2 :: new ( 0 . 0 0 . 0 ) .
}
None