Crate wgm

Source
Expand description

WebGPU mathematics (WGM) is a fast and easy to use mathematics library with minimal dependencies for graphics programming.

§Feature gates

all wgm dependencies are optional but you may want to enable some features to get the most out of the library.

  • swizzle - Enable swizzling for all vectors.
  • rand - Enable random number generation for all wgm types.
  • serde - Enable serialization and deserialization for all wgm types.
  • bytemuck - Enable bytemuck support for all vectors, matrices and units.

Modules§

alias
aliases for common types and functions conforming to wgsl conventions
units
units for representing angles and other quantities

Structs§

Mat2
A 2x2 column major matrix of type T.
Mat3
A 3x3 column major matrix of type T.
Mat4
A 4x4 column major matrix of type T.
Vec2
A 2-dimensional vector of type T.
Vec3
A 3-dimensional vector of type T.
Vec4
A 4-dimensional vector of type T.