1818#include "raylib.h"
1919
2020#include <stdlib.h> // Required for: rand()
21- #include <math.h> // Required for: cos (), sin ()
21+ #include <math.h> // Required for: cosf (), sinf ()
2222
2323#define MAX_POINTS 10000000 // 10 million
2424#define MIN_POINTS 1000 // 1 thousand
2525
26+ //------------------------------------------------------------------------------------
27+ // Module Functions Declaration
28+ //------------------------------------------------------------------------------------
2629// Generate mesh using points
2730static Mesh GenMeshPoints (int numPoints );
2831
@@ -148,6 +151,9 @@ int main()
148151 return 0 ;
149152}
150153
154+ //------------------------------------------------------------------------------------
155+ // Module Functions Definition
156+ //------------------------------------------------------------------------------------
151157// Generate a spherical point cloud
152158static Mesh GenMeshPoints (int numPoints )
153159{
@@ -158,7 +164,7 @@ static Mesh GenMeshPoints(int numPoints)
158164 .colors = (unsigned char * )MemAlloc (numPoints * 4 * sizeof (unsigned char )),
159165 };
160166
161- // https://en.wikipedia.org/wiki/Spherical_coordinate_system
167+ // REF: https://en.wikipedia.org/wiki/Spherical_coordinate_system
162168 for (int i = 0 ; i < numPoints ; i ++ )
163169 {
164170 float theta = ((float )PI * rand ())/((float )RAND_MAX );
0 commit comments