ggmath 0.16.3

A linear algebra library for games and graphics with generic SIMD types.
Documentation
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.16.3] - 2026-03-14

### Added

- Vector function `new`.

- Quaternion & Affine function `to_repr`.

### Changed

- Renamed matrix and affine functions:
  - `from_col_array` to `from_columns`
  - `from_col_fn` to `from_column_fn`
  - `as_col_array_ref` to `as_columns`
  - `as_col_array_mut` to `as_columns_mut`
  - `col` to `column`
  - `col_mut` to `column_mut`

- Replaced `Affine::from_cols` with `Affine::from_columns`.

- Fused `f32` and `f64` functionality into a single generic implementation. This
  doesn't have much effect except for making generated documentation clearer.

- Updated documentation.

### Deprecated

- Macros `vec2`, `vec3`, `vec4`, `mat2`, `mat3`, `mat4`. Use `Vector::new` and
  `Matrix::from_columns` instead.

- `Matrix::to_col_array`: replaced by `Matrix::as_columns`.

## 0.16.2 (16.2.2026)

- Added affine types:
  - `Affine2`
  - `Affine3`
  - `Affine2U`
  - `Affine3U`
  - `Affine`

- Added partial support for crates: `fixed`, `fixp`, `wide`.

- Modified documentation.

- Updated dependencies.

## 0.16.1 (14.2.2026)

- Added matrix types:
  - `Mat2`
  - `Mat3`
  - `Mat4`
  - `Mat2U`
  - `Mat3U`
  - `Mat4U`
  - `Matrix`

- Added quaternion types:
  - `Quat`
  - `QuatU`
  - `Quaternion`

- Added mask function: `to_repr`.

- Fixed vague safety documentation.

- Improved documentation.

## 0.16.0 (6.2.2026)

Breaking changes:

- Renamed the `NaN` trait to `Nan`.

- Removed vector functions: `get`, `get_mut`.

- Changed signature of vector functions: `from_fn`, `map`.

- Marked the `Scalar` trait unsafe.

- Replaced associated type `ScalarBackend::VectorRepr` with `Scalar::Repr`.
  
- Removed the `ScalarDefault` trait.

- Replaced vector functions `repr` and `from_repr` with `to_repr`.

Non breaking changes:

- Added mask types:
  - `Mask2`
  - `Mask3`
  - `Mask4`
  - `Mask2U`
  - `Mask3U`
  - `Mask4U`
  - `Mask`

- Added vector functions:
  - `eq_mask`
  - `ne_mask`
  - `lt_mask`
  - `gt_mask`
  - `le_mask`
  - `ge_mask`

- Added float vector functions:
  - `nan_mask`
  - `finite_mask`
  - `sign_positive_mask`
  - `sign_negative_mask`

- Added `ScalarBackend` functions:
  - `vec_eq_mask`
  - `vec_ne_mask`
  - `vec_lt_mask`
  - `vec_gt_mask`
  - `vec_le_mask`
  - `vec_ge_mask`

- Improved documentation.

## 0.15.1 (29.1.2025)

- Added a `FloatExt` trait.

- Added float vector functions:
  - `angle_between`
  - `clamp_length`
  - `cross`
  - `distance`
  - `distance_squared`
  - `exp`
  - `exp2`
  - `is_normalized`
  - `lerp`
  - `ln`
  - `log2`
  - `midpoint`
  - `move_towards`
  - `normalize_and_length`
  - `perp`
  - `powf`
  - `rotate`
  - `rotate_x`
  - `rotate_y`
  - `rotate_z`
  - `sin_cos`
  - `with_max_length`
  - `with_min_length`
  - `project_onto`
  - `project_onto_normalized`
  - `reject_from`
  - `reject_from_normalized`
  - `reflect`
  - `refract`
  - `any_orthogonal_vector`
  - `any_orthonormal_vector`
  - `any_orthonormal_pair`

- Added int vector functions:
  - `element_sum`
  - `element_product`
  - `max`
  - `min`
  - `clamp`
  - `max_element`
  - `min_element`
  - `abs`
  - `signum`
  - `dot`
  - `length_squared`
  - `distance_squared`
  - `perp`
  - `cross`
  - `checked_add`
  - `checked_sub`
  - `checked_mul`
  - `checked_div`
  - `checked_rem`
  - `saturating_add`
  - `saturating_sub`
  - `saturating_mul`
  - `saturating_div`
  - `wrapping_add`
  - `wrapping_sub`
  - `wrapping_mul`
  - `wrapping_div`
  - `wrapping_rem`

- Added uint vector functions:
  - `element_sum`
  - `element_product`
  - `max`
  - `min`
  - `clamp`
  - `max_element`
  - `min_element`
  - `dot`
  - `length_squared`
  - `checked_add`
  - `checked_sub`
  - `checked_mul`
  - `checked_div`
  - `checked_rem`
  - `saturating_add`
  - `saturating_sub`
  - `saturating_mul`
  - `wrapping_add`
  - `wrapping_sub`
  - `wrapping_mul`

- Added bool vector functions: `all`, `any`.

- Added support for crates: `bytemuck`, `libm`, `mint`, `serde`.

- Added missing `must_use` to functions.

- Modified documentation.

## 0.15.0

This update attempts to make the crate more stable so that more math
functionality can start being added.

- Moved all items from `crate::vector` to the crate root.

- Replaced primitive type-aliases with generic ones.

- Made `ScalarBackend` unsafe.

- Added `ScalarDefault`.

- Changed vector memory layout rules.

- Added float vector functions: `is_nan`, `is_finite`, `normalize_or_zero`.

- Added bool vector functions: `select`.

- Added constants:
  - `MIN`
  - `MAX`
  - `NAN`
  - `INFINITY`
  - `NEG_INFINITY`
  - `TRUE`
  - `FALSE`

- Removed vector functions:
  - `len`
  - `is_aligned`
  - `swizzle2`
  - `swizzle3`
  - `swizzle4`

- Fixed slight inconsistency between `normalize` and `try_normalize`.

- Removed direction constants (`RIGHT`, `LEFT`, etc..).

- Removed features `overflow_checks` and `debug_overflow_checks`.

- Replaced feature `debug_assertions` with `no-assertions`.

- Improved performance.

- Improved documentation.

## 0.14.0

- Simplified API.

- Added methods to float vectors: `normalize_or`.

- Removed support for element types: `Option<T>`, `MaybeUninit<T>`.

## 0.13.1

- Improved documentation.
- Added methods to float vectors:
  - `dot`
  - `length`
  - `length_squared`
  - `normalize`
  - `try_normalize`

## 0.13.0

This version completely rewrote the crate.

[0.16.3]: https://github.com/Noam2Stein/ggmath/compare/v0.16.2...v0.16.3