0.9.6
random.hpp
Go to the documentation of this file.
1 
40 #pragma once
41 
42 // Dependency:
43 #include "../vec2.hpp"
44 #include "../vec3.hpp"
45 
46 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
47 # pragma message("GLM: GLM_GTC_random extension included")
48 #endif
49 
50 namespace glm
51 {
54 
61  template <typename genTYpe>
62  GLM_FUNC_DECL genTYpe linearRand(
63  genTYpe Min,
64  genTYpe Max);
65 
66  template <typename T, precision P, template <typename, precision> class vecType>
67  GLM_FUNC_DECL vecType<T, P> linearRand(
68  vecType<T, P> const & Min,
69  vecType<T, P> const & Max);
70 
76  template <typename genType>
77  GLM_FUNC_DECL genType gaussRand(
78  genType Mean,
79  genType Deviation);
80 
85  template <typename T>
86  GLM_FUNC_DECL tvec2<T, defaultp> circularRand(
87  T Radius);
88 
93  template <typename T>
94  GLM_FUNC_DECL tvec3<T, defaultp> sphericalRand(
95  T Radius);
96 
101  template <typename T>
102  GLM_FUNC_DECL tvec2<T, defaultp> diskRand(
103  T Radius);
104 
109  template <typename T>
110  GLM_FUNC_DECL tvec3<T, defaultp> ballRand(
111  T Radius);
112 
114 }//namespace glm
115 
116 #include "random.inl"
GLM_FUNC_DECL tvec3< T, defaultp > ballRand(T Radius)
Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of...
GLM_FUNC_DECL tvec2< T, defaultp > circularRand(T Radius)
Generate a random 2D vector which coordinates are regulary distributed on a circle of a given radius...
GLM_FUNC_DECL genType gaussRand(genType Mean, genType Deviation)
Generate random numbers in the interval [Min, Max], according a gaussian distribution.
Definition: _noise.hpp:31
GLM_FUNC_DECL genTYpe linearRand(genTYpe Min, genTYpe Max)
Generate random numbers in the interval [Min, Max], according a linear distribution.
GLM_FUNC_DECL tvec3< T, defaultp > sphericalRand(T Radius)
Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius...
GLM_FUNC_DECL tvec2< T, defaultp > diskRand(T Radius)
Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a...