Skip to content

Commit f8f9d6e

Browse files
authored
Use fastSinCos for notes (#889)
* Update Strum.hx * Update Strum.hx
1 parent 6d3243b commit f8f9d6e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

source/funkin/game/Strum.hx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,9 @@ class Strum extends FlxSprite {
174174
if (daNote.isSustainNote) offset.y -= height * 0.5;
175175

176176
if (Std.int(daNote.__noteAngle % 360) != 0) {
177-
var noteAngleCos = FlxMath.fastCos(daNote.__noteAngle / PIX180);
178-
var noteAngleSin = FlxMath.fastSin(daNote.__noteAngle / PIX180);
177+
var noteAngle = FlxMath.fastSinCos(daNote.__noteAngle / PIX180);
178+
var noteAngleCos = noteAngle.cos;
179+
var noteAngleSin = noteAngle.sin;
179180

180181
var aOffset:FlxPoint = FlxPoint.get(
181182
(daNote.origin.x / daNote.scale.x) - daNote.offset.x,

0 commit comments

Comments
 (0)