# [−][src]Struct pbrt::core::geometry::Vector2

```pub struct Vector2<T> {
pub x: T,
pub y: T,
}```

## Fields

`x: T``y: T`

## Trait Implementations

### `impl<T> Add<Vector2<T>> for Vector2<T> where    T: Copy + Add<T, Output = T>, `[src]

#### `type Output = Vector2<T>`

The resulting type after applying the `+` operator.

### `impl<T> Add<Vector2<T>> for Point2<T> where    T: Add<T, Output = T>, `[src]

#### `type Output = Point2<T>`

The resulting type after applying the `+` operator.

### `impl Div<f32> for Vector2<f32>`[src]

#### `type Output = Vector2<f32>`

The resulting type after applying the `/` operator.

### `impl<T> Index<u8> for Vector2<T>`[src]

#### `type Output = T`

The returned type after indexing.

### `impl<T> Neg for Vector2<T> where    T: Copy + Neg<Output = T>, `[src]

#### `type Output = Vector2<T>`

The resulting type after applying the `-` operator.

### `impl<T> Sub<Vector2<T>> for Vector2<T> where    T: Copy + Sub<T, Output = T>, `[src]

#### `type Output = Vector2<T>`

The resulting type after applying the `-` operator.

### `impl<T> Sub<Vector2<T>> for Point2<T> where    T: Sub<T, Output = T>, `[src]

#### `type Output = Point2<T>`

The resulting type after applying the `-` operator.

## Blanket Implementations

### `impl<T> ToOwned for T where    T: Clone, `[src]

#### `type Owned = T`

The resulting type after obtaining ownership.

### `impl<T, U> TryFrom<U> for T where    U: Into<T>, `[src]

#### `type Error = Infallible`

The type returned in the event of a conversion error.

### `impl<T, U> TryInto<U> for T where    U: TryFrom<T>, `[src]

#### `type Error = <U as TryFrom<T>>::Error`

The type returned in the event of a conversion error.