mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-29 06:28:25 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
42
Brutal.Numerics/Vector/long2/long2.math-metric.gen.cs
Normal file
42
Brutal.Numerics/Vector/long2/long2.math-metric.gen.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
// <auto-generated /> - edit Vector.math-metric.tt to modify
|
||||
#nullable enable
|
||||
|
||||
namespace Brutal.Numerics;
|
||||
|
||||
public partial struct long2
|
||||
{
|
||||
/// <inheritdoc />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public readonly double Length()
|
||||
{
|
||||
return (double)double.Sqrt((double)X * X + (double)Y * Y);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public readonly long LengthSquared()
|
||||
{
|
||||
return Dot(this, this);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Vector2.Distance" />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static double Distance(long2 a, long2 b)
|
||||
{
|
||||
return (double)double.Sqrt(((double)a.X - b.X) * ((double)a.X - b.X) + ((double)a.Y - b.Y) * ((double)a.Y - b.Y));
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Vector2.DistanceSquared" />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static long DistanceSquared(long2 a, long2 b)
|
||||
{
|
||||
return (a.X - b.X) * (a.X - b.X) + (a.Y - b.Y) * (a.Y - b.Y);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Vector2.Dot" />
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static long Dot(long2 a, long2 b)
|
||||
{
|
||||
return a.X * b.X + a.Y * b.Y;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue