Optimized note math

This commit is contained in:
NeeEoo
2023-10-19 14:38:04 +02:00
parent cb04524748
commit fecaee2fea
4 changed files with 20 additions and 9 deletions
+4
View File
@@ -581,6 +581,10 @@ class CoolUtil
return r;
}
public static inline function quantize(Value:Float, Quant:Float) {
return Math.fround(Value * Quant) / Quant;
}
/**
* Sets a SoundFrontEnd's music to a FlxSound.
* Example: `FlxG.sound.setMusic(music);`