Editor/Embedded/Datamodel/QAngle.cs

The code defines a QAngle record struct to store Euler angles for pitch, yaw, and roll. It implements implicit conversions between QAngle and the System.Numerics Vector3 type.

#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);
}