Compare.Equal<T>
Static Method in Compare
Declaration
public static float Equal<T>(Func<T> foo, Func<T> bar, int iterations, bool log = true, bool logIndividual = false)
where T : IEquatable<T>Description
Compares how many results of the two functions are equal for a given amount of iterations.
Type Parameters
| T |
Parameters
| foo | The first function to execute. |
| bar | The second function to execute. |
| iterations | The amount of times each function is executed. |
| log | Logs the final comparison result. |
| logIndividual | Logs the result of each iteration of the functions. |
Returns
| float | The percentage of equal results. |