Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ pub struct ModulatorEnv<T> {
impl<T: Default> ModulatorEnv<T> {
/// Create an empty ModulatorEnv
pub fn new() -> Self {
ModulatorEnv {
Self {
mods: HashMap::new(),
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/sources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub struct Wave {
impl Wave {
/// Build a sin wave with given amplitude and frequency
pub fn new(amplitude: f32, frequency: f32) -> Self {
Wave {
Self {
amplitude,
frequency,

Expand Down Expand Up @@ -115,7 +115,7 @@ pub struct ScalarSpring {
impl ScalarSpring {
/// Make a critically damped spring
pub fn new(smooth: f32, undamp: f32, initial: f32) -> Self {
ScalarSpring {
Self {
smooth,
undamp,

Expand Down Expand Up @@ -229,7 +229,7 @@ pub struct ScalarGoalFollower {
impl ScalarGoalFollower {
/// Make a scalar goal follower
pub fn new(follower: Box<dyn Modulator<f32>>) -> Self {
ScalarGoalFollower {
Self {
regions: vec![],
random_region: false,

Expand Down Expand Up @@ -397,7 +397,7 @@ impl Newtonian {
deceleration: [f32; 2],
initial: f32,
) -> Self {
Newtonian {
Self {
speed_limit,

acceleration,
Expand Down Expand Up @@ -616,7 +616,7 @@ impl ShiftRegister {
let b = Self::new_buckets(buckets, &value_range);
let v = if buckets > 0 { b[0] } else { 0.0 };

ShiftRegister {
Self {
buckets: b,
ages: vec![0; buckets],

Expand Down