This gets 1/2 of the circle.
- Code: Select all
const int sr = 420; // Radius
int sx = sr - rand(sr * 2); // X-coordinate
int sy = sqrt(pow(sr, 2) + pow(sx, 2)); // Y-coordinate
const int sr = 420; // Radius
int sx = sr - rand(sr * 2); // X-coordinate
int sy = sqrt(pow(sr, 2) + pow(sx, 2)); // Y-coordinate
double ang = rand(360);
double radius = rand(420);
int sx = 0 + cos(ang)*radius;
int sy = 0 + sin(ang)*radius;
Users browsing this forum: No registered users and 1 guest