vendor raymenu dependencies

This commit is contained in:
Ivar Fatland
2026-05-10 01:49:00 +02:00
parent a2f05963bb
commit 35c229182b
346 changed files with 391647 additions and 1 deletions
@@ -0,0 +1,15 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2025 The Ebitengine Authors
//go:build !go1.25
package xreflect
import "reflect"
// TODO: remove this and use Go 1.25's reflect.TypeAssert when minimum go.mod version is 1.25
func TypeAssert[T any](v reflect.Value) (T, bool) {
v2, ok := v.Interface().(T)
return v2, ok
}
@@ -0,0 +1,12 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2025 The Ebitengine Authors
//go:build go1.25
package xreflect
import "reflect"
func TypeAssert[T any](v reflect.Value) (T, bool) {
return reflect.TypeAssert[T](v)
}