Random.h 609 B

123456789101112131415161718192021222324252627
  1. // Copyright (c) 2008-2023 the Urho3D project
  2. // License: MIT
  3. #pragma once
  4. #ifdef URHO3D_IS_BUILDING
  5. #include "Urho3D.h"
  6. #else
  7. #include <Urho3D/Urho3D.h>
  8. #endif
  9. #include "../Base/PrimitiveTypes.h"
  10. namespace Urho3D
  11. {
  12. /// Set the random seed. The default seed is 1.
  13. URHO3D_API void SetRandomSeed(unsigned seed);
  14. /// Return the current random seed.
  15. URHO3D_API unsigned GetRandomSeed();
  16. /// Return a random number between 0-32767. Should operate similarly to MSVC rand().
  17. /// @alias{RandomInt}
  18. URHO3D_API int Rand();
  19. /// Return a standard normal distributed number.
  20. URHO3D_API float RandStandardNormal();
  21. }