Enum rich_sdl2_rust::haptic::effect::WaveKind
source · #[non_exhaustive]
pub enum WaveKind {
Sine,
Triangle,
SawToothUp,
SwaToothDown,
}
Expand description
A kind of the waveform.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Sine
A sine wave like:
__ __ __ __
/ \ / \ / \ /
/ \__/ \__/ \__/
Triangle
A triangle wave like:
/\ /\ /\ /\ /\
/ \ / \ / \ / \ /
/ \/ \/ \/ \/
SawToothUp
An upwards sawtooth wave like:
/| /| /| /| /| /| /|
/ | / | / | / | / | / | / |
/ |/ |/ |/ |/ |/ |/ |
SwaToothDown
A downwards sawtooth wave like:
\ |\ |\ |\ |\ |\ |\ |
\ | \ | \ | \ | \ | \ | \ |
\| \| \| \| \| \| \|