Class: PhysicsPlus::ElementsTheoryRelativity

Inherits:
Object
  • Object
show all
Defined in:
lib/physics_plus/elements_theory_relativity.rb

Overview

This class elements theory relativity formulas

Class Method Summary collapse

Class Method Details

.inertial_system_length(length_0, speed) ⇒ Object



9
10
11
# File 'lib/physics_plus/elements_theory_relativity.rb', line 9

def self.inertial_system_length(length_0, speed)
  length_0 * Math.sqrt(1-(speed.to_f ** 2)/(Constants::C ** 2))
end

.inertial_system_time(time_0, speed) ⇒ Object



13
14
15
# File 'lib/physics_plus/elements_theory_relativity.rb', line 13

def self.inertial_system_time(time_0, speed)
  time_0 / Math.sqrt(1 - (speed.to_f ** 2)/(Constants::C ** 2))
end

.inertial_system_weight(weight_0, speed) ⇒ Object



17
18
19
# File 'lib/physics_plus/elements_theory_relativity.rb', line 17

def self.inertial_system_weight(weight_0, speed)
  weight_0 / Math.sqrt(1 - (speed.to_f ** 2)/(Constants::C ** 2))
end

.relationship_mass_energy(weight) ⇒ Object



21
22
23
# File 'lib/physics_plus/elements_theory_relativity.rb', line 21

def self.relationship_mass_energy(weight)
  weight.to_f * (Constants::C ** 2)
end

.relativistic_velocity_addition(speed_1, speed_2) ⇒ Object



5
6
7
# File 'lib/physics_plus/elements_theory_relativity.rb', line 5

def self.relativistic_velocity_addition(speed_1, speed_2)
  (speed_1 + speed_2)/(1 + (speed_1 * speed_2.to_f)/Constants::C ** 2 )
end