lib/driving_physics/disk.rb in driving_physics-0.0.1.2 vs lib/driving_physics/disk.rb in driving_physics-0.0.2.1
- old
+ new
@@ -1,7 +1,7 @@
require 'driving_physics/environment'
-require 'driving_physics/vector_force'
+#require 'driving_physics/vector_force'
module DrivingPhysics
# radius is always in meters
# force in N
# torque in Nm
@@ -108,14 +108,14 @@
attr_reader :env
attr_accessor :radius, :width, :density, :base_friction, :omega_friction
def initialize(env)
@env = env
- @radius = 350/1000r # m
- @width = 200/1000r # m
+ @radius = 0.35
+ @width = 0.2
@density = DENSITY
- @base_friction = 5/100_000r # constant resistance to rotation
- @omega_friction = 5/100_000r # scales with omega
+ @base_friction = 5.0/100_000 # constant resistance to rotation
+ @omega_friction = 5.0/100_000 # scales with omega
yield self if block_given?
end
def to_s
[[format("%d mm x %d mm (RxW)", @radius * 1000, @width * 1000),