README.md in danica-0.3.0 vs README.md in danica-1.0.0
- old
+ new
@@ -1,6 +1,9 @@
# danica
+[![Code Climate](https://codeclimate.com/github/darthjee/danica/badges/gpa.svg)](https://codeclimate.com/github/darthjee/danica)
+[![Test Coverage](https://codeclimate.com/github/darthjee/danica/badges/coverage.svg)](https://codeclimate.com/github/darthjee/danica/coverage)
+
A tool for math formulation on docs
## How to use
Add the gem to your project or just install the gem
@@ -58,18 +61,31 @@
Power.new(base: time, exponent: 2)
end
end
end
-Danica::Function.new(
+fx = Danica::Function.new(
time: :t,
acceleration: 'a',
- initial_space: { name: :S0, latex: 'S_0' },
- initial_velocity: { name: :V0, latex: 'V_0' }
-).to_tex
+ initial_space: { name: :S0, latex: 'S_0', gnu: 'S0' },
+ initial_velocity: { name: :V0, latex: 'V_0', gnu: 'V0' }
+)
```
+```ruby
+fx.to_tex
+```
+
returns
```string
S_0 + V_0 \cdot t + \frac{a \cdot t^2}{2}
+```
+
+```ruby
+fx.to_gnu
+```
+
+returns
+```string
+S0 + V0 * t + a * t**2/2
```