+ comments to the SM.Base
+ Length, Normalize methods for CVectors
This commit is contained in:
parent
5d4b360b05
commit
9b917ac181
18 changed files with 248 additions and 33 deletions
|
|
@ -84,6 +84,9 @@ namespace SM.Utility
|
|||
return (float) Randomizer.NextDouble() * (max - min) + min;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a random item from the provided list.
|
||||
/// </summary>
|
||||
public static TSource GetRandomItem<TSource>(this IList<TSource> list)
|
||||
{
|
||||
return list[GetInt(0, list.Count - 1)];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue