Exemple #1
0
 /// <summary>
 /// Gets whether or not this is a unit vector, i.e. has a magnitude of 1.
 /// </summary>
 /// <param name="decimals">Optional precision at which to make the comparison.</param>
 public bool IsUnitVector(int decimals = -1)
 {
     // TODO: Change name to GetIsUnitVector
     if (decimals >= 0)
     {
         return(Magnitude.RoundFromZero(decimals) == 1m);
     }
     else
     {
         return(Magnitude == 1m);
     }
 }