physics_plus 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6bc4da6fd12bc78fa6ae8a0caff854bd453d174fd6e303a7c1261744c7f79b0f
4
- data.tar.gz: 0ed44719ca8736e15d710730ff4911507aacd914d3f86526f1009295e16f6221
3
+ metadata.gz: 68f215f8775f979e0034ceb43d376dd9b3c2de884e8b2b91e585aa5f6f844002
4
+ data.tar.gz: ee1abe52951e3eab86e6fb07c3ebe57f3ae297629d4d883d16a14a73d1085ed9
5
5
  SHA512:
6
- metadata.gz: a21a567967c8e42c6c736e015fefc758efe9fdee602aa952f839c7b31d7c592d0c0d3b4bbc5fd5428d96084e0a57de02764134293d9d94418aeb0ef7ea7e5277
7
- data.tar.gz: d39463800150f7a712f215bd975318a52fa1ce9643b349fd8f37e7079d3feef819e0bf218c0ce2a7b8ae18a49512fb15090d430508038b0f240bc29439cc0940
6
+ metadata.gz: 151d6de5367201c1e305080b51ce93d447aecfd2b5269545a53df228f009bc5c46986da9aa437dea55ea52c1fe3ef9b5aa803715d5d868db53ada666511cdd56
7
+ data.tar.gz: 03fad634f23e53c5ef67cf21d7bc330849c27d90f2b64d174e227d882af9be1d0462da3a36e824a804794b42b49296c9f58631b5595e61514c8cae85e2bf5403
data/README.md CHANGED
@@ -41,12 +41,17 @@ puts PhysicsPlus::Constants.List_planck_quantities
41
41
  puts PhysicsPlus::Constants.List_different_systems_quantities
42
42
  puts PhysicsPlus::Constants.List_electromagnetic_constants
43
43
 
44
-
45
44
  PhysicsPlus::Constants::C => 299792458
46
45
  PhysicsPlus::Constants::Speed_light_vacuum => 299792458
47
46
 
48
47
  PhysicsPlus::Constants::G => 6.02214076e+23
49
48
  PhysicsPlus::Constants::Gravitational_constant => 6.02214076e+23
49
+
50
+ PhysicsPlus::Optics.absolute_refractive_index(200_000_000) => 1.49896229
51
+ PhysicsPlus::Optics.power_lens(2) => 0.5
52
+
53
+ PhysicsPlus::ElementsTheoryRelativity.inertial_system_length(1.5, 200_000_000) => 1.1174144036800955
54
+ PhysicsPlus::ElementsTheoryRelativity.inertial_system_time(60, 200_000_000) => 80.54308205048527
50
55
  ```
51
56
 
52
57
 
@@ -55,3 +60,4 @@ PhysicsPlus::Constants::Gravitational_constant => 6.02214076e+23
55
60
  MIT
56
61
 
57
62
  **Free Software, Hell Yeah!**
63
+
@@ -0,0 +1,26 @@
1
+ # This module elements theory relativity
2
+ module PhysicsPlus
3
+ # This class elements theory relativity formulas
4
+ class ElementsTheoryRelativity
5
+ def self.relativistic_velocity_addition(speed_1, speed_2)
6
+ (speed_1 + speed_2)/(1 + (speed_1 * speed_2.to_f)/Constants::C ** 2 )
7
+ end
8
+
9
+ def self.inertial_system_length(length_0, speed)
10
+ length_0 * Math.sqrt(1-(speed.to_f ** 2)/(Constants::C ** 2))
11
+ end
12
+
13
+ def self.inertial_system_time(time_0, speed)
14
+ time_0 / Math.sqrt(1 - (speed.to_f ** 2)/(Constants::C ** 2))
15
+ end
16
+
17
+ def self.inertial_system_weight(weight_0, speed)
18
+ weight_0 / Math.sqrt(1 - (speed.to_f ** 2)/(Constants::C ** 2))
19
+ end
20
+
21
+ def self.relationship_mass_energy(weight)
22
+ weight.to_f * (Constants::C ** 2)
23
+ end
24
+ end
25
+ end
26
+
@@ -1,6 +1,6 @@
1
- # This module contains physical constants
1
+ # This module optics
2
2
  module PhysicsPlus
3
- # This module contains the solution of problems in optics
3
+ # This class optics formulas
4
4
  class Optics
5
5
  def self.absolute_refractive_index(speed)
6
6
  raise 'speed must not exceed the speed of light' if Constants::C < speed
@@ -1,5 +1,5 @@
1
1
  # This module VERSION gem
2
2
  module PhysicsPlus
3
3
  # @return VERSION
4
- VERSION = '0.0.5'
4
+ VERSION = '0.0.6'
5
5
  end
data/lib/physics_plus.rb CHANGED
@@ -1,8 +1,9 @@
1
1
  require_relative 'physics_plus/constants'
2
2
  require_relative 'physics_plus/optics'
3
3
  require_relative 'physics_plus/version'
4
+ require_relative 'physics_plus/elements_theory_relativity'
4
5
 
5
6
  # This module is the main one for the gem
6
7
 
7
8
  module PhysicsPlus
8
- end
9
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: physics_plus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - AlexVikPast
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-21 00:00:00.000000000 Z
11
+ date: 2023-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -35,6 +35,7 @@ files:
35
35
  - README.md
36
36
  - lib/physics_plus.rb
37
37
  - lib/physics_plus/constants.rb
38
+ - lib/physics_plus/elements_theory_relativity.rb
38
39
  - lib/physics_plus/optics.rb
39
40
  - lib/physics_plus/version.rb
40
41
  homepage: https://github.com/AlexVikPast/physics_plus