mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
SOURCE DUMP v1
This commit is contained in:
parent
bd62d51ec9
commit
fb20299e9d
1 changed files with 768360 additions and 0 deletions
|
|
@ -0,0 +1,60 @@
|
|||
// <auto-generated /> - edit Vector.math.tt to modify
|
||||
#nullable enable
|
||||
|
||||
namespace Brutal.Numerics;
|
||||
|
||||
public partial struct double2
|
||||
{
|
||||
/// <inheritdoc cref="Vector2.Reflect" />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static double2 Reflect(double2 vector, double2 normal)
|
||||
{
|
||||
return vector - 2 * Dot(vector, normal) * normal;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Vector2.Transform(Vector2, Matrix3x2)" />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static double2 Transform(double2 position, double3x2 matrix)
|
||||
{
|
||||
var result = matrix.X * position.X;
|
||||
|
||||
result += matrix.Y * position.Y;
|
||||
result += matrix.Z;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Vector2.Transform(Vector2, Matrix4x4)" />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static double2 Transform(double2 position, double4x4 matrix)
|
||||
{
|
||||
return double4.Transform(position, matrix).XY;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Vector2.Transform(Vector2, Quaternion)" />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static double2 Transform(double2 value, doubleQuat rotation)
|
||||
{
|
||||
return double4.Transform(value, rotation).XY;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Vector2.TransformNormal(Vector2, Matrix3x2)" />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static double2 TransformNormal(double2 normal, double3x2 matrix)
|
||||
{
|
||||
var result = matrix.X * normal.X;
|
||||
result += matrix.Y * normal.Y;
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Vector2.TransformNormal(Vector2, Matrix4x4)" />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static double2 TransformNormal(double2 normal, double4x4 matrix)
|
||||
{
|
||||
var result = matrix.X * normal.X;
|
||||
|
||||
result += matrix.Y * normal.Y;
|
||||
|
||||
return result.XY;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue