mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-02-05 07:24:30 +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) {
|
func (matrix *Geometry) Rotate(theta float64) {
|
||||||
cos := math.Cos(theta)
|
sin, cos := math.Sincos(theta)
|
||||||
sin := math.Sin(theta)
|
|
||||||
rotate := Geometry{
|
rotate := Geometry{
|
||||||
[2][3]float64{
|
[2][3]float64{
|
||||||
{cos, -sin, 0},
|
{cos, -sin, 0},
|
||||||
|
Loading…
Reference in New Issue
Block a user