mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
Use math.Sincos
This commit is contained in:
parent
8860d315ca
commit
784a67aadf
@ -47,8 +47,7 @@ func (matrix *Geometry) Translate(tx, ty float64) {
|
||||
}
|
||||
|
||||
func (matrix *Geometry) Rotate(theta float64) {
|
||||
cos := math.Cos(theta)
|
||||
sin := math.Sin(theta)
|
||||
sin, cos := math.Sincos(theta)
|
||||
rotate := Geometry{
|
||||
[2][3]float64{
|
||||
{cos, -sin, 0},
|
||||
|
Loading…
Reference in New Issue
Block a user