forked from bit/DotRecastNetSim
refactor: remve RcVec3f.Of(float[] f)
This commit is contained in:
parent
228bdc9e4d
commit
19136129ab
|
@ -33,11 +33,6 @@ namespace DotRecast.Core
|
|||
public static RcVec3f UnitY { get; } = new RcVec3f(0.0f, 1.0f, 0.0f);
|
||||
public static RcVec3f UnitZ { get; } = new RcVec3f(0.0f, 0.0f, 1.0f);
|
||||
|
||||
public static RcVec3f Of(float[] f)
|
||||
{
|
||||
return Of(f, 0);
|
||||
}
|
||||
|
||||
public static RcVec3f Of(float[] f, int idx)
|
||||
{
|
||||
return new RcVec3f(f[idx + 0], f[idx + 1], f[idx + 2]);
|
||||
|
@ -61,11 +56,11 @@ namespace DotRecast.Core
|
|||
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public RcVec3f(float[] f)
|
||||
public RcVec3f(ReadOnlySpan<float> values)
|
||||
{
|
||||
X = f[0];
|
||||
Y = f[1];
|
||||
Z = f[2];
|
||||
X = values[0];
|
||||
Y = values[1];
|
||||
Z = values[2];
|
||||
}
|
||||
|
||||
public float this[int index]
|
||||
|
|
|
@ -1071,7 +1071,7 @@ namespace DotRecast.Detour
|
|||
};
|
||||
|
||||
// Find polygon to connect to.
|
||||
var refs = FindNearestPolyInTile(tile, RcVec3f.Of(con.pos), ext, out var nearestPt);
|
||||
var refs = FindNearestPolyInTile(tile, new RcVec3f(con.pos[0], con.pos[1], con.pos[2]), ext, out var nearestPt);
|
||||
if (refs == 0)
|
||||
{
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue