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.
Files changed (3) hide show
  1. data/sassy-math.gemspec +1 -1
  2. data/stylesheets/_math.scss +33 -15
  3. metadata +2 -2
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{sassy-math}
5
- s.version = "0.1.7"
5
+ s.version = "0.1.8"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5")
8
8
  s.authors = ["Sam Richard", "Mario Valencia", "Scott Kellum"]
@@ -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
- // Bundled in compass: http://compass-style.org/reference/compass/helpers/trig/
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
  //////////////////////////////
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 7
9
- version: 0.1.7
8
+ - 8
9
+ version: 0.1.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sam Richard