graphics: Bug fix: compile error

This commit is contained in:
Hajime Hoshi 2018-07-31 01:56:59 +09:00
parent 0956ca0ea6
commit 5c201af311

View File

@ -255,10 +255,10 @@ func (i *Image) DrawImage(img *Image, options *DrawImageOptions) error {
if filter == graphics.FilterLinear { if filter == graphics.FilterLinear {
det := geom.det() det := geom.det()
if det == 0 { if det == 0 {
return return nil
} }
if math.IsNan(det) { if math.IsNaN(float64(det)) {
return return nil
} }
level = graphicsutil.MipmapLevel(det) level = graphicsutil.MipmapLevel(det)
if level < 0 { if level < 0 {