Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardosnt committed Oct 19, 2016
1 parent 377f7a2 commit 35b976a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Api/Command/CommandExtensions.cs
Expand Up @@ -49,9 +49,15 @@ public static class CommandExtensions {
return null;
}

public static bool IsInRange(this ICommandArgument src, int min, int max) {
/// <summary>
/// </summary>
/// <param name="src"></param>
/// <param name="minInclusive">Maximum value</param>
/// <param name="maxInclusive">Minimum value</param>
/// <returns></returns>
public static bool IsInRange(this ICommandArgument src, int minInclusive, int maxInclusive) {
var val = src.ToInt;
return val >= min && val <= max;
return val >= minInclusive && val <= maxInclusive;
}

}
Expand Down

0 comments on commit 35b976a

Please sign in to comment.