Skip to content

Commit

Permalink
Fix bug for calculating vframes.
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeWannacott committed Sep 21, 2023
1 parent a934943 commit 52a57bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gontage.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func sliceChunk[T any](slice []T, chunkSize int) [][]T {
}

func calcSheetDimensions(hframes int, all_decoded_images []image.Image) (int, int, float64) {
vframes := math.Ceil(float64(len(all_decoded_images)/hframes) + 1)
vframes := math.Ceil((float64(len(all_decoded_images)) / float64(hframes)))
var spritesheet_width int
var spritesheet_height int
for _, image := range all_decoded_images[:hframes] {
Expand Down

0 comments on commit 52a57bf

Please sign in to comment.