6 releases

new 0.2.0 Oct 21, 2024
0.1.4 Apr 15, 2024
0.1.1 Mar 2, 2024

#498 in Rust patterns

MIT license

55KB
1.5K SLoC

glam-traits

Latest Version docs

Traits for the vectors in glam.

There are traits for the following characteristics:

  • "Any"
  • Signed
  • Float
  • Int
  • Signed int
  • Unsigned int

For lengths "any", 2, 3 and 4:

Any 2 3 4
Any GVec GVec2 GVec3 GVec4
Signed SignedVec SignedVec2 SignedVec3 SignedVec4
Float FloatVec FloatVec2 FloatVec3 FloatVec4
Int IntVec IntVec2 IntVec3 IntVec4
Signed int SIntVec SIntVec2 SIntVec3 SIntVec4
Unsigned int UIntVec UIntVec2 UIntVec3 UIntVec4

As well as for concrete types of any length:

I16Vec, U16Vec, I32Vec, U32Vec, I64Vec, U64Vec, F32Vec, F64Vec

GBVec is also provided to cover boolean vectors.

Traits are implemented for the appropriate glam types.

Dependencies

~3.5MB
~104K SLoC