6 releases

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

#502 in Rust patterns

Download history 11/week @ 2024-09-22 156/week @ 2024-10-20 5/week @ 2024-10-27 6/week @ 2024-11-03 1/week @ 2024-11-10

168 downloads per month

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

~4MB
~119K SLoC