# `Cauldron3D.Vec`
[🔗](https://github.com/jaman/cauldron/blob/v0.2.2/cauldron_3d/lib/cauldron_3d/vec.ex#L1)

Three-component vectors as `{x, y, z}` float tuples.

    Cauldron3D.Vec.add({1.0, 0.0, 0.0}, {0.0, 2.0, 0.0})
    #=> {1.0, 2.0, 0.0}

# `t`

```elixir
@type t() :: {float(), float(), float()}
```

# `add`

```elixir
@spec add(t(), t()) :: t()
```

`a + b`.

# `cross`

```elixir
@spec cross(t(), t()) :: t()
```

The cross product.

# `dot`

```elixir
@spec dot(t(), t()) :: float()
```

The dot product.

# `float`

```elixir
@spec float({number(), number(), number()}) :: t()
```

The vector as floats.

# `length`

```elixir
@spec length(t()) :: float()
```

The length.

# `lerp`

```elixir
@spec lerp(t(), t(), number()) :: t()
```

The point `t` of the way from `a` to `b`.

# `madd`

```elixir
@spec madd(t(), t(), number()) :: t()
```

`a + b * s`.

# `max`

```elixir
@spec max(t(), t()) :: t()
```

Each component the larger of the two.

# `min`

```elixir
@spec min(t(), t()) :: t()
```

Each component the smaller of the two.

# `normalize`

```elixir
@spec normalize(t()) :: t()
```

The vector scaled to length one; the zero vector stays zero.

# `scale`

```elixir
@spec scale(t(), number()) :: t()
```

`v * s`.

# `sub`

```elixir
@spec sub(t(), t()) :: t()
```

`a - b`.

# `zero`

```elixir
@spec zero() :: t()
```

The zero vector.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
