before merge from remote
This commit is contained in:
@@ -15,6 +15,32 @@ namespace StgSharp.Mathematics.Numeric.Graphics
|
||||
public static class Vec3
|
||||
{
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static Vec3<double> ConvertToDouble(Vec3<long> source)
|
||||
{
|
||||
return FromVector256Unsafe(Vector256.ConvertToDouble(source.AsVector256Safe()));
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static Vec3<double> ConvertToDouble(Vec3<ulong> source)
|
||||
{
|
||||
return FromVector256Unsafe(Vector256.ConvertToDouble(source.AsVector256Safe()));
|
||||
}
|
||||
|
||||
#region cast
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static Vec3<float> ConvertToSingle(Vec3<int> source)
|
||||
{
|
||||
return FromVector128Unsafe(Vector128.ConvertToSingle(source.AsVector128Safe()));
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static Vec3<float> ConvertToSingle(Vec3<uint> source)
|
||||
{
|
||||
return FromVector128Unsafe(Vector128.ConvertToSingle(source.AsVector128Safe()));
|
||||
}
|
||||
|
||||
public static bool IsParallel<T>(Vec3<T> left, Vec3<T> right) where T: unmanaged,INumber<T>
|
||||
{
|
||||
return Cross(left, right).Equals(T.Zero);
|
||||
@@ -64,29 +90,7 @@ namespace StgSharp.Mathematics.Numeric.Graphics
|
||||
return Unsafe.As<Vector256<T>, Vec3<T>>(ref source);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static Vec3<float> ConvertToSingle(Vec3<int> source)
|
||||
{
|
||||
return FromVector128Unsafe(Vector128.ConvertToSingle(source.AsVector128Safe()));
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static Vec3<float> ConvertToSingle(Vec3<uint> source)
|
||||
{
|
||||
return FromVector128Unsafe(Vector128.ConvertToSingle(source.AsVector128Safe()));
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static Vec3<double> ConvertToDouble(Vec3<long> source)
|
||||
{
|
||||
return FromVector256Unsafe(Vector256.ConvertToDouble(source.AsVector256Safe()));
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static Vec3<double> ConvertToDouble(Vec3<ulong> source)
|
||||
{
|
||||
return FromVector256Unsafe(Vector256.ConvertToDouble(source.AsVector256Safe()));
|
||||
}
|
||||
#ednregion
|
||||
|
||||
#region cross
|
||||
|
||||
|
||||
Reference in New Issue
Block a user