Sha256: 993932527a0ef927cfc8ab5bf6c182c7fd8c06f7fd2ee16c3e0ca49e56cf6ced
Contents?: true
Size: 551 Bytes
Versions: 11
Compression:
Stored size: 551 Bytes
Contents
require_relative "../helper.rb" describe Ashton do let(:accuracy) { 0.000001 } describe "fast_sin" do it "should give the same result as Math.sin" do (-360..360).step 90 do |angle| Ashton.fast_sin(angle).should be_within(accuracy).of Math.sin(angle.gosu_to_radians) end end end describe "fast_cos" do it "should give the same result as Math.cos" do (-360..360).step 90 do |angle| Ashton.fast_cos(angle).should be_within(accuracy).of Math.cos(angle.gosu_to_radians) end end end end
Version data entries
11 entries across 11 versions & 2 rubygems