change: RoundToOneDecimal

This commit is contained in:
lilong.129
2025-06-05 17:47:29 +08:00
parent c4e7ab00a7
commit 8cdc71d90b
6 changed files with 27 additions and 18 deletions

View File

@@ -4,7 +4,6 @@ import (
"crypto/md5"
"fmt"
"io"
"math"
"math/rand/v2"
"net/http"
"os"
@@ -53,8 +52,8 @@ func convertToAbsolutePoint(driver IDriver, x, y float64) (absX, absY float64, e
return 0, 0, err
}
absX = math.Round(float64(windowSize.Width)*x*10) / 10
absY = math.Round(float64(windowSize.Height)*y*10) / 10
absX = builtin.RoundToOneDecimal(float64(windowSize.Width) * x)
absY = builtin.RoundToOneDecimal(float64(windowSize.Height) * y)
return absX, absY, nil
}