pub fn dot<U>(self, rhs: Vector2<U>) -> <<T as Mul<U>>::Output as Add>::Output
	where
		T: Mul<U>,
		<T as Mul<U>>::Output: Add,
	{
		self.x * rhs.x + self.y * rhs.y
	}
/// Take the dot product of two vectors.
///
/// The dot product for a 2D vector is defined
/// (given two vectors `a` and `b`) as:
/// `a.x * b.x + a.y * b.x`.
///
/// # Example
/// ```
/// # extern crate airmash_protocol;
/// # use airmash_protocol::*;
/// # fn main() {
/// let a: Vector2<i32> = Vector2::new(1, 2);
/// let b: Vector2<i32> = Vector2::new(3, 4);
///
/// let c = Vector2::dot(a, b);
///
/// assert_eq!(c, 11);
/// # }
/// ```
Take the dot product of two vectors.
Take the dot product of two vectors .
pub fn dot<U>(self, rhs: Vector2<U>) -> <<T as Mul<U>>::Output as Add>::Output
	where
		T: Mul<U>,
		<T as Mul<U>>::Output: Add,
	{
		self.x * rhs.x + self.y * rhs.y
	}
pub fn dot < U > ( self , rhs : Vector2 < U > ) -> < < T as Mul < U > > :: Output as Add > :: Output where T : Mul < U > , < T as Mul < U > > :: Output : Add , { self . x * rhs . x + self . y * rhs . y }
Take the dot product of two vectors.
Take the dot product of two vectors .
self
rhs
Vector2<U>
self
rhs
Vector2<U>
example
None
extern crate airmash_protocol;
None
use airmash_protocol::*;
None
fn main() {


let c = Vector2::dot(a, b).


let c = Vector2 :: dot ( a b ) .
}
None