sassy-math 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.6"
5
+ s.version = "0.1.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5")
8
8
  s.authors = ["Sam Richard", "Mario Valencia", "Scott Kellum"]
@@ -254,3 +254,36 @@ $ϕ: $golden;
254
254
  }
255
255
  @return $root;
256
256
  }
257
+
258
+ //////////////////////////////
259
+ // Is Int and Is Float
260
+ //////////////////////////////
261
+ @function is-int($number) {
262
+ @if type-of($number) != 'number' {
263
+ @warn '#{$number} is not a number! It cannot be an integer if it is not a number!';
264
+ @return false;
265
+ }
266
+ @if $number - floor($number) != 0 {
267
+ @return false;
268
+ }
269
+ @else {
270
+ @return true;
271
+ }
272
+ }
273
+
274
+ @function is-float($number) {
275
+ @if type-of($number) != 'number' {
276
+ @warn '#{$number} is not a number! It cannot be an decimal if it is not a number!';
277
+ @return false;
278
+ }
279
+ @if $number - floor($number) != 0 {
280
+ @return true;
281
+ }
282
+ @else {
283
+ @return false;
284
+ }
285
+ }
286
+
287
+ @function is-decimal($number) {
288
+ @return is-float($number);
289
+ }
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 6
9
- version: 0.1.6
8
+ - 7
9
+ version: 0.1.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sam Richard