HighMap library (C++)
Loading...
Searching...
No Matches
vector.cpp File Reference

Namespaces

namespace  hmap
 

Functions

std::vector< float > hmap::gradient1d (const std::vector< float > &v)
 Compute the gradient of a 1D vector.
 
void hmap::laplace1d (std::vector< float > &v, float sigma=0.5f, int iterations=1)
 Apply a low-pass Laplace filter to a vector.
 
std::vector< float > hmap::linspace (float start, float stop, int num, bool endpoint=true)
 Generate a vector of evenly spaced numbers over a specified interval.
 
std::vector< float > hmap::linspace_jitted (float start, float stop, int num, float ratio, int seed, bool endpoint=true)
 Generate a vector of jittered (noised) numbers over a specified interval.
 
std::vector< float > hmap::random_vector (float min, float max, int num, int seed)
 Generate a vector filled with random values within a specified range.