spec/number_additions_spec.rb in bootstripe-0.2.16 vs spec/number_additions_spec.rb in bootstripe-0.2.17
- old
+ new
@@ -6,9 +6,16 @@
5.clamp(1, 3).should == 3
5.clamp(0, 6).should == 5
5.clamp(6, 8).should == 6
end
+ it 'should lerp numbers' do
+ 5.lerp(10, 0).should eq 5
+ 5.lerp(10, 0.5).should eq 7.5
+ 5.lerp(10, 1.0).should eq 10
+ 5.lerp(10, 2.0).should eq 10
+ end
+
it 'should report formatted time accurately' do
0.to_formatted_time.should eq '00:00'
(60.75).to_formatted_time.should eq '01:01'
(673.2).to_formatted_time.should eq '11:13'
end
\ No newline at end of file