From 7675e2735b739c4fb8e4c11c062702ae89ed164d Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Wed, 22 Sep 2021 23:39:56 +0900 Subject: [PATCH] internal/graphicscommand: Refactoring: Do not you 'int' as a variable name --- internal/graphicscommand/command.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/graphicscommand/command.go b/internal/graphicscommand/command.go index cc9814505..34e8fa0f6 100644 --- a/internal/graphicscommand/command.go +++ b/internal/graphicscommand/command.go @@ -227,17 +227,17 @@ func (q *commandQueue) flush() error { // Instead, align the vertices with about 1/3 pixels. for idx := 0; idx < 2; idx++ { x := vs[i*graphics.VertexFloatNum+idx] - int := float32(math.Floor(float64(x))) - frac := x - int + ix := float32(math.Floor(float64(x))) + frac := x - ix switch { case frac < 3.0/16.0: - vs[i*graphics.VertexFloatNum+idx] = int + vs[i*graphics.VertexFloatNum+idx] = ix case frac < 8.0/16.0: - vs[i*graphics.VertexFloatNum+idx] = int + 5.0/16.0 + vs[i*graphics.VertexFloatNum+idx] = ix + 5.0/16.0 case frac < 13.0/16.0: - vs[i*graphics.VertexFloatNum+idx] = int + 11.0/16.0 + vs[i*graphics.VertexFloatNum+idx] = ix + 11.0/16.0 default: - vs[i*graphics.VertexFloatNum+idx] = int + 16.0/16.0 + vs[i*graphics.VertexFloatNum+idx] = ix + 16.0/16.0 } } }