Initial QSfera import

This commit is contained in:
Курнат Андрей
2026-06-07 10:20:04 +03:00
commit 2315f25754
16485 changed files with 4826827 additions and 0 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)
}