MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ set_phase()

void MayaFlux::Nodes::Generator::Phasor::set_phase ( double  phase)
inline

Sets the current phase of the phasor.

Parameters
phaseNew phase value (0.0 to 1.0)

This allows direct control of the phasor's position in its cycle, useful for synchronizing with other generators or external events.

Definition at line 197 of file Phasor.hpp.

198 {
199 m_phase = phase;
200 // Keep phase in [0, 1) range
201 while (m_phase >= 1.0)
202 m_phase -= 1.0;
203 while (m_phase < 0.0)
204 m_phase += 1.0;
205 }
double m_phase
Current phase of the generator.