You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
513 B
19 lines
513 B
9 years ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace UnityTest
|
||
|
{
|
||
|
public abstract class VectorComparerBase<T> : ComparerBaseGeneric<T>
|
||
|
{
|
||
|
protected bool AreVectorMagnitudeEqual(float a, float b, double floatingPointError)
|
||
|
{
|
||
|
if (Math.Abs(a) < floatingPointError && Math.Abs(b) < floatingPointError)
|
||
|
return true;
|
||
|
if (Math.Abs(a - b) < floatingPointError)
|
||
|
return true;
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
}
|