Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Type correction: float -> double #2029

Merged
merged 1 commit into from

2 participants

Geoffroy Billotey Michael Droettboom
Geoffroy Billotey

Addresses a comment on #2019:
Doubles should be used for vertices.

Michael Droettboom mdboom merged commit cdf7d0a into from
Geoffroy Billotey GBillotey deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 20, 2013
  1. Geoffroy Billotey
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/path_converters.h
8 src/path_converters.h
View
@@ -866,10 +866,10 @@ class Sketch
if (m_has_last) {
// We want the "cursor" along the sine wave to move at a
// random rate.
- float _drand48 = rand() / float(RAND_MAX);
- float _M_PI = 3.14159265358979323846;
- m_p += pow(m_randomness, _drand48 * 2.0 - 1.0);
- double r = sin(m_p / (m_length / (_M_PI * 2.0))) * m_scale;
+ double d_rand = rand() / double(RAND_MAX);
+ double d_M_PI = 3.14159265358979323846;
+ m_p += pow(m_randomness, d_rand * 2.0 - 1.0);
+ double r = sin(m_p / (m_length / (d_M_PI * 2.0))) * m_scale;
double den = m_last_x - *x;
double num = m_last_y - *y;
double len = num*num + den*den;
Something went wrong with that request. Please try again.