math_plus 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: ca98dcd6fc233842f1edbb76d2227ff5661a68d78655d560915bd9e981a1ff39
4
+ data.tar.gz: c97635753bb1fc1409b222844af1fd08d98311adc7374377140830f067cddf59
5
+ SHA512:
6
+ metadata.gz: 5443f1932e63474cdbd56054ea44e51f335507f95d721776eb49f5fff9732024fb1f736422e7dd7b062499f5a4d73fbb7e6f0ebbf23b2f18b6cd7b5f1d2f2b3a
7
+ data.tar.gz: 64b44c6f2fdbcab4d6ee3799476468c953ece513e7285aa1c71c39b55be52d0920e6b95448d4433bce01f1dcd47d0b14f5eb92c747fbbdc0b1875b77d9c4790f
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gemspec
data/README.md ADDED
File without changes
@@ -0,0 +1,13 @@
1
+ require_relative '../validation/triangle'
2
+
3
+ module Main
4
+ module Formulas
5
+ def geron(a, b, c)
6
+ Validation::Triangle.three_way_check(a, b, c)
7
+ # find the semiperimeter
8
+ p = (a + b + c) / 2.0
9
+ # calculate the area
10
+ area = Math.sqrt(p * (p - a) * (p - b) * (p - c))
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,7 @@
1
+ require_relative 'main/formulas'
2
+
3
+ module MathPlus
4
+ extend Main::Formulas
5
+ end
6
+
7
+
@@ -0,0 +1,9 @@
1
+ module Validation
2
+ module Triangle
3
+ def self.three_way_check(a, b, c)
4
+ if a + b <= c || a + c <= b || b + c <= a
5
+ raise "The triangle doesn't exist"
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,3 @@
1
+ module MathPlus
2
+ VERSION = '0.0.1'
3
+ end
metadata ADDED
@@ -0,0 +1,64 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: math_plus
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - AlexVikPast
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-07-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.6'
27
+ description: Extension of the standard mathematical package(Math)
28
+ email: steplerpav@gmail.com
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files:
32
+ - README.md
33
+ files:
34
+ - Gemfile
35
+ - README.md
36
+ - lib/math_plus/main/formulas.rb
37
+ - lib/math_plus/math_plus.rb
38
+ - lib/math_plus/validation/triangle.rb
39
+ - lib/math_plus/version.rb
40
+ homepage: https://github.com/AlexVikPast/math_plus
41
+ licenses:
42
+ - MIT
43
+ metadata:
44
+ rubygems_mfa_required: 'true'
45
+ post_install_message:
46
+ rdoc_options: []
47
+ require_paths:
48
+ - lib
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: 2.7.0
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ requirements: []
60
+ rubygems_version: 3.4.17
61
+ signing_key:
62
+ specification_version: 4
63
+ summary: Extension of the standard mathematical package(Math)
64
+ test_files: []