• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mlange-42 / ark-pixel / 13720015176

07 Mar 2025 11:46AM CUT coverage: 34.646% (+5.5%) from 29.148%
13720015176

push

github

web-flow
Add resource inspector (#5)

69 of 93 new or added lines in 1 file covered. (74.19%)

264 of 762 relevant lines covered (34.65%)

67.62 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/window/util.go
1
package window
2

3
import (
4
        "math"
5

6
        "github.com/gopxl/pixel/v2/backends/opengl"
7
)
8

9
// Scale calculates the drawing scale for fitting a source region into a window's canvas.
10
func Scale(win *opengl.Window, srcWidth, srcHeight float64) float64 {
1✔
11
        winWidth, winHeight := win.Canvas().Bounds().W(), win.Canvas().Bounds().H()
1✔
12
        scX, scY := winWidth/float64(srcWidth), winHeight/float64(srcHeight)
1✔
13
        return math.Min(scX, scY)
1✔
14
}
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc