mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-17 19:26:35 -07:00
fix(rotate): max angle to 270
This commit is contained in:
parent
489817eda6
commit
5a6ed699e8
2 changed files with 2 additions and 2 deletions
|
|
@ -70,8 +70,8 @@ type Options struct {
|
||||||
Embed bool
|
Embed bool
|
||||||
Flip bool
|
Flip bool
|
||||||
Flop bool
|
Flop bool
|
||||||
Type ImageType
|
|
||||||
Rotate Angle
|
Rotate Angle
|
||||||
Gravity Gravity
|
Gravity Gravity
|
||||||
|
Type ImageType
|
||||||
Interpolator Interpolator
|
Interpolator Interpolator
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -334,5 +334,5 @@ func getAngle(angle Angle) Angle {
|
||||||
if divisor != 0 {
|
if divisor != 0 {
|
||||||
angle = angle - divisor
|
angle = angle - divisor
|
||||||
}
|
}
|
||||||
return angle
|
return Angle(math.Min(float64(angle), 270))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue