sassy-math 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/sassy-math.gemspec +1 -1
- data/stylesheets/_math.scss +33 -15
- metadata +2 -2
data/sassy-math.gemspec
CHANGED
data/stylesheets/_math.scss
CHANGED
@@ -28,20 +28,6 @@ $iter: 50;
|
|
28
28
|
@return $number * 0.01;
|
29
29
|
}
|
30
30
|
|
31
|
-
//////////////////////////////
|
32
|
-
// Golden Ratio
|
33
|
-
//////////////////////////////
|
34
|
-
@function golden() {
|
35
|
-
@return 1/2 + sqrt(5) / 2;
|
36
|
-
}
|
37
|
-
@function ϕ() {
|
38
|
-
@return golden();
|
39
|
-
}
|
40
|
-
|
41
|
-
$golden: golden();
|
42
|
-
$gold: $golden;
|
43
|
-
$ϕ: $golden;
|
44
|
-
|
45
31
|
//////////////////////////////
|
46
32
|
// Exponent
|
47
33
|
//////////////////////////////
|
@@ -115,8 +101,27 @@ $ϕ: $golden;
|
|
115
101
|
//////////////////////////////
|
116
102
|
// Basic Trig Functions
|
117
103
|
//////////////////////////////
|
104
|
+
@function sin($number, $unit: 'deg') {
|
105
|
+
@if $unit == 'deg' {
|
106
|
+
$number: deg-to-rad($number);
|
107
|
+
}
|
108
|
+
@return maclaurin($number, 3, $number);
|
109
|
+
}
|
118
110
|
|
119
|
-
|
111
|
+
@function cos($number, $unit: 'deg') {
|
112
|
+
@if $unit == 'deg' {
|
113
|
+
$number: deg-to-rad($number);
|
114
|
+
}
|
115
|
+
@return maclaurin(1, 2, $number);
|
116
|
+
}
|
117
|
+
|
118
|
+
// Trig Identity: Tangent = Sine divided by Cosine.
|
119
|
+
@function tan($number, $unit: 'deg') {
|
120
|
+
@if $unit == 'deg' {
|
121
|
+
$number: deg-to-rad($number);
|
122
|
+
}
|
123
|
+
@return sin($number) / cos($number);
|
124
|
+
}
|
120
125
|
|
121
126
|
//////////////////////////////
|
122
127
|
// Reciprocal Trig Functions
|
@@ -255,6 +260,19 @@ $ϕ: $golden;
|
|
255
260
|
@return $root;
|
256
261
|
}
|
257
262
|
|
263
|
+
//////////////////////////////
|
264
|
+
// Golden Ratio
|
265
|
+
//////////////////////////////
|
266
|
+
@function golden() {
|
267
|
+
@return 1/2 + sqrt(5) / 2;
|
268
|
+
}
|
269
|
+
@function ϕ() {
|
270
|
+
@return golden();
|
271
|
+
}
|
272
|
+
|
273
|
+
$golden-ratio: golden();
|
274
|
+
$ϕ: $golden-ratio;
|
275
|
+
|
258
276
|
//////////////////////////////
|
259
277
|
// Is Int and Is Float
|
260
278
|
//////////////////////////////
|