Editor/Embedded/Datamodel/QAngle.cs

A small value type representing Euler angles (pitch, yaw, roll) used in the editor datamodel. It stores three floats and provides implicit conversions to and from System.Numerics.Vector3.

Native Interop
#nullable enable
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;

namespace HumanoidRetargeter.EditorTools.Embedded.Datamodel;

public record struct QAngle(float Pitch, float Yaw, float Roll)
{
    public static implicit operator global::System.Numerics.Vector3(QAngle q) => new(q.Pitch, q.Yaw, q.Roll);
    public static implicit operator QAngle(global::System.Numerics.Vector3 v) => new(v.X, v.Y, v.Z);
}