#tuple #operator #io #swizzle

tuple_swizzle

Adds swizzle operator to tuples

2 stable releases

1.0.1 Oct 15, 2020

#514 in Compression

MIT license

74KB
1.5K SLoC

tuple_swizzle

Crates.io

Docs.rs

Using in your project

tuple_swizzle = "1.0.1"

tuple_swizzle adds swizzle operations( such as (1, 255, 255, 255).bgra(), (1, 2.0_f32).yx(), or

(1, 2, 3, 4).wzyx() ), familiar to anyone who used GLSL, to tuples of up to 4 elements.

Just import the traits via use tuple_swizzle::swizzle::*

Works for all types that implement Copy


lib.rs:

tuple_swizzle

tuple_swizzle adds swizzle operations( such as (1, 255, 255, 255).bgra(), (1, 2.0_f32).yx(), or (1, 2, 3, 4).wzyx() ), familiar to anyone who used GLSL, to tuples of up to 4 elements. Just import the traits via use tuple_swizzle::swizzle::* Works for all types that implement Copy

No runtime deps