Skip to content

Commit

Permalink
Apply rounding to path points
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin Schürz committed Jan 22, 2025
1 parent 70a4390 commit ffc5301
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/hitObjects/pathPointSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { PathPoint } from './PathPoint';

export const pathPointSerializer: ISerializer<PathPoint, [number, number, PathType | null]> = {
serialize(value) {
return [value.position.x, value.position.y, value.type];
return [Math.round(value.position.x * 10) / 10, Math.round(value.position.y * 10) / 10, value.type];
},
deserialize(value) {
return new PathPoint(new Vec2(value[0], value[1]), value[2]);
Expand Down

0 comments on commit ffc5301

Please sign in to comment.