Skip to content
Snippets Groups Projects
Verified Commit 80ed241a authored by TheJoeCoder's avatar TheJoeCoder
Browse files

Round debug text to 2dp

parent f101929a
Branches
No related tags found
No related merge requests found
......@@ -192,9 +192,12 @@ const drawConnectingLines = () => {
const drawDebugText = () => {
for(let dot of dots) {
let vx = Math.round((dot.vx + Number.EPSILON) * 100) / 100
let vy = Math.round((dot.vy + Number.EPSILON) * 100) / 100
ctx.beginPath();
ctx.font = "15px Arial";
ctx.fillText(`${dot.vx}/${dot.vy}`,dot.x,dot.y);
ctx.fillStyle = "#fff";
ctx.fillText(`${vx}/${vy}`,dot.x,dot.y);
ctx.closePath();
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment