sassy-math 1.4 → 1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/sassy-math.rb +3 -7
- data/sassy-math.gemspec +1 -1
- metadata +3 -3
data/lib/sassy-math.rb
CHANGED
|
@@ -48,12 +48,8 @@ module Sass::Script::Functions
|
|
|
48
48
|
end
|
|
49
49
|
Sass::Script::Number.new(result)
|
|
50
50
|
end
|
|
51
|
-
def random(
|
|
52
|
-
|
|
53
|
-
Sass::Script::Color.new(:red => rand(255), :green => rand(255), :blue => rand(255))
|
|
54
|
-
else
|
|
55
|
-
Sass::Script::Number.new(rand(max.value), max.numerator_units, max.denominator_units)
|
|
56
|
-
end
|
|
51
|
+
def random(max = Sass::Script::Number.new(100)) ## shamelessly taken from here: https://gist.github.com/1561650
|
|
52
|
+
Sass::Script::Number.new(rand(max.value), max.numerator_units, max.denominator_units)
|
|
57
53
|
end
|
|
58
54
|
def hypot(a, b)
|
|
59
55
|
a = a.value.to_f
|
|
@@ -157,7 +153,7 @@ end
|
|
|
157
153
|
|
|
158
154
|
module SassyMath
|
|
159
155
|
|
|
160
|
-
VERSION = "1.
|
|
156
|
+
VERSION = "1.5"
|
|
161
157
|
DATE = "2012-07-29"
|
|
162
158
|
|
|
163
159
|
end
|
data/sassy-math.gemspec
CHANGED
metadata
CHANGED