# [−][src]Trait vex::Matrix

```pub trait Matrix<T> {
fn transform_point(&self, point: &T) -> T;
}```

## Implementors

### `impl Matrix<Vector2> for Matrix2`[src]

#### `fn transform_point(&self, point: &Vector2) -> Vector2`[src]

Find the resulting vector given a vector and matrix

# Examples

```use vex::Matrix;
use vex::Matrix2;
use vex::Vector2;

let m = Matrix2::make(1.0, 2.0, 3.0, 4.0);
let v = Vector2::make(1.0, 2.0);
let actual = m.transform_point(&v);
let expected = Vector2::make(7.0, 10.0);
assert_eq!(actual, expected);```

### `impl Matrix<Vector2> for Matrix3`[src]

#### `fn transform_point(&self, point: &Vector2) -> Vector2`[src]

Find the resulting vector given a vector and matrix

# Examples

```use vex::Matrix;
use vex::Matrix3;
use vex::Vector2;

let m = Matrix3::make(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0);
let v = Vector2::make(1.0, 2.0);
let actual = m.transform_point(&v);
let expected = Vector2::make(16.0, 20.0);
assert_eq!(actual, expected);```

### `impl Matrix<Vector3> for Matrix3`[src]

#### `fn transform_point(&self, point: &Vector3) -> Vector3`[src]

Find the resulting vector given a vector and matrix

# Examples

```use vex::Matrix;
use vex::Matrix3;
use vex::Vector3;

let m = Matrix3::make(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0);
let v = Vector3::make(1.0, 2.0, 3.0);
let actual = m.transform_point(&v);
let expected = Vector3::make(30.0, 36.0, 42.0);
assert_eq!(actual, expected);```

### `impl Matrix<Vector3> for Matrix4`[src]

#### `fn transform_point(&self, point: &Vector3) -> Vector3`[src]

Find the resulting vector given a vector and matrix

# Examples

```use vex::Matrix;
use vex::Matrix4;
use vex::Vector3;

let m = Matrix4::make(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0);
let v = Vector3::make(1.0, 2.0, 3.0);
let actual = m.transform_point(&v);
let expected = Vector3::make(51.0, 58.0, 65.0);
assert_eq!(actual, expected);```

### `impl Matrix<Vector4> for Matrix4`[src]

#### `fn transform_point(&self, point: &Vector4) -> Vector4`[src]

Find the resulting vector given a vector and matrix

# Examples

```use vex::Matrix;
use vex::Matrix4;
use vex::Vector4;

let m = Matrix4::make(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0);
let v = Vector4::make(1.0, 2.0, 3.0, 4.0);
let actual = m.transform_point(&v);
let expected = Vector4::make(90.0, 100.0, 110.0, 120.0);
assert_eq!(actual, expected);```