mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
refs #452, allow to pick random elements from collection
(will be used in view resizing)
This commit is contained in:
committed by
Mathew Sutcliffe
parent
5718abe03c
commit
ad1938b8d8
@@ -98,6 +98,12 @@ namespace BlackMisc
|
||||
|
||||
//! Normalize: 0≤ degrees <360
|
||||
static double normalizeDegrees(double degrees);
|
||||
|
||||
//! Random number between low and high
|
||||
static int randomIntger(int low, int high)
|
||||
{
|
||||
return qrand() % ((high + 1) - low) + low;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user