modularscale / modularscale-sass

Modular scale calculator built into your Sass

Home Page:http://www.modularscale.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Negative Steps return Step 1

Snugug opened this issue · comments

When using Modular Scale 2.0.0.alpha5, I call the following function:

ms(1, 100, 1.618);
ms(-1, 100, 1.618);
ms(2, 100, 1.618);

The first two items return the same number, that being the ratio. The third produces a different number. Having tested this, any negative number will produce the same result as step 1.

Can you tell me what your output is? I am unable to replicate this.

@debug ms(2, 100, 1.618);
@debug ms(1, 100, 1.618);
@debug ms(0, 100, 1.618);
@debug ms(-1, 100, 1.618);
@debug ms(-2, 100, 1.618);
@debug ms(-3, 100, 1.618);
/Users/scottkellum/Sites/modular-scale/test-compass/sass/style.scss:11 DEBUG: 261.7924
/Users/scottkellum/Sites/modular-scale/test-compass/sass/style.scss:12 DEBUG: 161.8
/Users/scottkellum/Sites/modular-scale/test-compass/sass/style.scss:13 DEBUG: 100
/Users/scottkellum/Sites/modular-scale/test-compass/sass/style.scss:14 DEBUG: 61.8047
/Users/scottkellum/Sites/modular-scale/test-compass/sass/style.scss:15 DEBUG: 38.19821
/Users/scottkellum/Sites/modular-scale/test-compass/sass/style.scss:16 DEBUG: 23.60829

I'm working on Singularity Extras and trying to debug the ratio-spiral issue (returns a string instead of a list of numbers) and am using the Compass version of Modular Scale (so the Ruby functions). Maybe the problem's in the Ruby functions, not the Sass functions?