struct Float64
- Float64
- Float
- Number
- Value
- Object
Included Modules
Defined in:
ray_tracer_challenge/core_extensions.crInstance Method Summary
-
#clamp(max, min)
Clamps a value between min and max.
- #equivalent(other : Float64, delta = Float64::EPSILON)
- #to_color_255
Instance methods inherited from module RayTracerChallenge::Transform::CoreExtensions::Float64
rotation_x
rotation_x,
rotation_y
rotation_y,
rotation_z
rotation_z
Instance Method Detail
def clamp(max, min)
#
Description copied from module Comparable(Number)
Clamps a value between min and max.
5.clamp(10, 100) # => 10
50.clamp(10, 100) # => 50
500.clamp(10, 100) # => 100
5.clamp(10, nil) # => 10
50.clamp(10, nil) # => 50
5.clamp(nil, 10) # => 5
50.clamp(nil, 10) # => 10