This commit is contained in:
2025-05-14 10:52:53 +02:00
parent 1e190fe94b
commit f0536f4129
51 changed files with 934 additions and 381 deletions

View File

@@ -32,5 +32,12 @@ namespace RebootKit.Engine.Extensions {
public static bool IsNonZero(this float3 vec, float epsilon = float.Epsilon) {
return !vec.IsZero(epsilon);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsInRange(this float3 vec, float3 pos, float range) {
float dstSquared = math.distancesq(vec, pos);
float rangeSquared = range * range;
return dstSquared <= rangeSquared;
}
}
}