mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
graphics: Add BenchmarkGeoM
This commit is contained in:
parent
f05bf143f7
commit
06d3eb66c7
14
geom_test.go
14
geom_test.go
@ -15,8 +15,10 @@
|
|||||||
package ebiten_test
|
package ebiten_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
. "github.com/hajimehoshi/ebiten"
|
"math"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
. "github.com/hajimehoshi/ebiten"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGeometryInit(t *testing.T) {
|
func TestGeometryInit(t *testing.T) {
|
||||||
@ -88,3 +90,13 @@ func TestGeometryConcat(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func BenchmarkGeoM(b *testing.B) {
|
||||||
|
var m GeoM
|
||||||
|
for i := 0; i < b.N; i++ {
|
||||||
|
m = GeoM{}
|
||||||
|
m.Translate(10, 20)
|
||||||
|
m.Scale(2, 3)
|
||||||
|
m.Rotate(math.Pi / 2)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user