Stage 2: render pipeline and UI toolkit over gpu/platform. Stage 3: schema registry, asset pipeline + runtime loader, scene graph and ECS. Stage 4: editor — docking, inspector, scene/game views, play mode, asset browser, console, profiler; 4.5 adds the 3D foundation (mixed 2D/3D spaces, meshes, depth). Stage 5: Aego Script — compiler (lexer/parser/types/resolver/checker/asm/compiler), bytecode with verifier and register VM, instance runtime, stdlib, native bindings, and editor/CLI integration (aego run/edit/check/test/dump).
18 lines
423 B
Go
18 lines
423 B
Go
package mathx
|
|
|
|
import "testing"
|
|
|
|
func TestQuatLookDir(t *testing.T) {
|
|
for _, d := range []Vec3{
|
|
{Z: -1}, {X: 1}, {X: -2, Y: 1, Z: 3}, {Y: -2, Z: -6}, {X: 0.3, Y: 0.9, Z: -0.1},
|
|
} {
|
|
got := QuatLookDir(d).Rotate(Vec3{Z: -1})
|
|
if !got.NearlyEqual(d.Normalized(), 1e-5) {
|
|
t.Fatalf("look %v -> forward %v", d, got)
|
|
}
|
|
}
|
|
if QuatLookDir(Vec3{}) != QuatIdentity() {
|
|
t.Fatal("zero direction must give identity")
|
|
}
|
|
}
|