Skip to content
Snippets Groups Projects
Unverified Commit 45267e00 authored by orestis.malaspin's avatar orestis.malaspin
Browse files

added friction

parent f34856b3
Branches
No related tags found
No related merge requests found
#include <stdlib.h>
#include "util.h"
double rand_to_range(double x0, double x1) {
double delta = x1 - x0;
double rescaled = (double)rand() / RAND_MAX * delta + x0;
return rescaled;
}
#ifndef _UTIL_H_
#define _UTIL_H_
double rand_to_range(double x0, double x1);
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment