mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-21 23:17:46 +00:00
Formatted code (#1007)
* Updated style * Updated files * fixed new line * Updated spacing * File fix WIP * Updated to clang 13 * updated comment style * Removed old comment code
This commit is contained in:
@@ -25,26 +25,25 @@
|
||||
#include <cstdint>
|
||||
|
||||
class PhaseAccumulator {
|
||||
public:
|
||||
constexpr PhaseAccumulator(
|
||||
const uint32_t phase_inc
|
||||
) : phase_inc { phase_inc }
|
||||
{
|
||||
}
|
||||
public:
|
||||
constexpr PhaseAccumulator(
|
||||
const uint32_t phase_inc)
|
||||
: phase_inc{phase_inc} {
|
||||
}
|
||||
|
||||
bool operator()() {
|
||||
const auto last_phase = phase;
|
||||
phase += phase_inc;
|
||||
return (phase < last_phase);
|
||||
}
|
||||
bool operator()() {
|
||||
const auto last_phase = phase;
|
||||
phase += phase_inc;
|
||||
return (phase < last_phase);
|
||||
}
|
||||
|
||||
void set_inc(const uint32_t new_phase_inc) {
|
||||
phase_inc = new_phase_inc;
|
||||
}
|
||||
void set_inc(const uint32_t new_phase_inc) {
|
||||
phase_inc = new_phase_inc;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32_t phase { 0 };
|
||||
uint32_t phase_inc;
|
||||
private:
|
||||
uint32_t phase{0};
|
||||
uint32_t phase_inc;
|
||||
};
|
||||
|
||||
#endif/*__PHASE_ACCUMULATOR_HPP__*/
|
||||
#endif /*__PHASE_ACCUMULATOR_HPP__*/
|
||||
|
Reference in New Issue
Block a user