From 847a8b4d535b292dcd5cb4f8e9fcbd469ba13956 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Wed, 26 Jun 2019 00:18:40 +0900 Subject: [PATCH] graphics: Refactoring --- internal/graphics/math.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/graphics/math.go b/internal/graphics/math.go index 1ddeb340b..db1f1b3f1 100644 --- a/internal/graphics/math.go +++ b/internal/graphics/math.go @@ -14,14 +14,14 @@ package graphics -// minInternalImageSize is the minimum size of internal images (texture/framebuffer). -// -// For example, the image size less than 15 is not supported on some iOS devices. -// See also: https://stackoverflow.com/questions/15935651 -const minInternalImageSize = 16 - // InternalImageSize returns a nearest appropriate size as an internal image. func InternalImageSize(x int) int { + // minInternalImageSize is the minimum size of internal images (texture/framebuffer). + // + // For example, the image size less than 15 is not supported on some iOS devices. + // See also: https://stackoverflow.com/questions/15935651 + const minInternalImageSize = 16 + if x <= 0 { panic("graphics: x must be positive") }