27#ifndef EASY3D_CORE_RANDOM_H
28#define EASY3D_CORE_RANDOM_H
32#include <easy3d/core/types.h>
40 return float(std::rand()) / float(RAND_MAX);
50 static float min_rgb = 0.3f;
51 min_rgb = allow_dark ? 0.0f : min_rgb;
Definition: collider.cpp:182
Vec< 3, float > vec3
A 3D point/vector of float type.
Definition: types.h:45
FT max()
Function returning maximum representable value for a given type.
FT min()
Function returning minimum representable value for a given type.
float random_float()
Random real in [0, 1].
Definition: random.h:39
vec3 random_color(bool allow_dark=false)
Generates a random color. The parameter allow_dark controls if too dark colors are allowed.
Definition: random.h:49