mirror of
https://github.com/AssetRipper/AssetRipper.git
synced 2025-12-11 20:15:29 +01:00
24 lines
612 B
C#
24 lines
612 B
C#
using AssetRipper.SourceGenerated.Subclasses.Quaternionf;
|
|
using System.Numerics;
|
|
|
|
namespace AssetRipper.SourceGenerated.Extensions
|
|
{
|
|
public static class QuaternionfExtensions
|
|
{
|
|
public static Quaternion CastToStruct(this IQuaternionf vector)
|
|
{
|
|
return new Quaternion(vector.X, vector.Y, vector.Z, vector.W);
|
|
}
|
|
|
|
public static void CopyValues(this IQuaternionf vector, Quaternion source)
|
|
{
|
|
vector.X = source.X;
|
|
vector.Y = source.Y;
|
|
vector.Z = source.Z;
|
|
vector.W = source.W;
|
|
}
|
|
|
|
public static void SetIdentity(this IQuaternionf vector) => vector.CopyValues(Quaternion.Identity);
|
|
}
|
|
}
|