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

mlange-42 / ark-pixel / 13719732838

07 Mar 2025 11:28AM CUT coverage: 29.148% (+8.1%) from 21.025%
13719732838

push

github

web-flow
Add entity inspector (#4)

76 of 103 new or added lines in 1 file covered. (73.79%)

195 of 669 relevant lines covered (29.15%)

31.42 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