You're breathtaking!
This commit is contained in:
17
Source/Engine/Core/Random.h
Normal file
17
Source/Engine/Core/Random.h
Normal file
@@ -0,0 +1,17 @@
|
||||
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace Random
|
||||
{
|
||||
/// <summary>
|
||||
/// Generates a pseudo-random number from normalized range [0;1].
|
||||
/// </summary>
|
||||
/// <returns>The random number.</returns>
|
||||
inline float Rand()
|
||||
{
|
||||
return (float)rand() / (float)RAND_MAX;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user