symbolic 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ begin
5
5
  require 'jeweler'
6
6
  Jeweler::Tasks.new do |gem|
7
7
  gem.name = "symbolic"
8
- gem.version = '0.3.6'
8
+ gem.version = '0.3.7'
9
9
  gem.summary = 'Symbolic math for ruby'
10
10
  gem.description = 'Symbolic math for ruby. This gem can help if you want to get a simplified form of a big equation or to speed up similar calculations or you need an abstraction layer for math. Symbolic does not have any external dependencies. It uses only pure ruby (less than 400 lines of code).'
11
11
  gem.email = "ravwar@gmail.com"
@@ -44,9 +44,9 @@ module Symbolic
44
44
 
45
45
  def simple?(var)
46
46
  case var
47
- when Numeric, Variable
47
+ when Numeric, Variable, Function
48
48
  true
49
- when Function, Summands
49
+ when Summands
50
50
  false
51
51
  when Factors
52
52
  var.symbolic.all? {|k,v| simple? k }
@@ -92,7 +92,7 @@ module Symbolic
92
92
  end
93
93
 
94
94
  def brackets(var)
95
- [Numeric, Symbolic::Variable].any? {|klass| var.is_a? klass } ? var : "(#{var})"
95
+ [Numeric, Variable, Function].any? {|klass| var.is_a? klass } ? var : "(#{var})"
96
96
  end
97
97
 
98
98
  def simplify_output
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: symbolic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - brainopia
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-30 00:00:00 +03:00
12
+ date: 2009-12-31 00:00:00 +03:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency