8000 Merge pull request #2029 from GBillotey/SDK_build · matplotlib/matplotlib@cdf7d0a · GitHub
[go: up one dir, main page]

Skip to content

Commit cdf7d0a

Browse files
committed
Merge pull request #2029 from GBillotey/SDK_build
Type correction: float -> double
2 parents 016d120 + f2cc66b commit cdf7d0a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/path_converters.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -866,10 +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-
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;
869+
double d_rand = rand() / double(RAND_MAX);
870+
double d_M_PI = 3.14159265358979323846;
871+
m_p += pow(m_randomness, d_rand * 2.0 - 1.0);
872+
double r = sin(m_p / (m_length / (d_M_PI * 2.0))) * m_scale;
873873
double den = m_last_x - *x;
874874
double num = m_last_y - *y;
875875
double len = num*num + den*den;

0 commit comments

Comments
 (0)
0