File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -866,8 +866,10 @@ class Sketch
866866 if (m_has_last) {
867867 // We want the "cursor" along the sine wave to move at a
868868 // random rate.
869- m_p += pow (m_randomness, drand48 () * 2.0 - 1.0 );
870- double r = sin (m_p / (m_length / (M_PI * 2.0 ))) * m_scale;
869+ float _drand48 = rand () / float (RAND_MAX);
870+ float _M_PI = 3.14159265358979323846 ;
871+ m_p += pow (m_randomness, _drand48 * 2.0 - 1.0 );
872+ double r = sin (m_p / (m_length / (_M_PI * 2.0 ))) * m_scale;
871873 double den = m_last_x - *x;
872874 double num = m_last_y - *y;
873875 double len = num*num + den*den;
@@ -891,8 +893,7 @@ class Sketch
891893 inline void
892894 rewind (unsigned path_id)
893895 {
894- unsigned short seed[] = {0 , 0 , 0 };
895- seed48 (seed);
896+ srand (0 );
896897 m_has_last = false ;
897898 m_p = 0.0 ;
898899 if (m_scale != 0.0 ) {
You can’t perform that action at this time.
0 commit comments