MCPcopy Create free account
hub / github.com/arrayfire/forge / map_range_to_vec_vbo

Function map_range_to_vec_vbo

examples/cpu/plotting.cpp:25–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24using namespace std;
25void map_range_to_vec_vbo(float range_start, float range_end, float dx,
26 std::vector<float> &vec,
27 float (*map) (float))
28{
29 if(range_start > range_end && dx > 0) return;
30 for(float i=range_start; i < range_end; i+=dx){
31 vec.push_back(i);
32 vec.push_back((*map)(i));
33 }
34}
35
36int main(void)
37{

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected