Sha256: 7e1fae2f6ac2431df314019744577efe0a935479ab40c9431d7240fdf696d57c

Contents?: true

Size: 504 Bytes

Versions: 8

Compression:

Stored size: 504 Bytes

Contents

require_relative 'test_helper'

Dir.chdir(File.dirname(__FILE__))

class DeglutTest < Minitest::Test
  attr_reader :to_radian

  def setup
    @to_radian = Math::PI / 180
  end

  def test_cos_sin
    (-720..720).step(1) do |deg|
      sine = DegLut.sin(deg)
      deg_sin = Math.sin(deg * to_radian)
      assert_in_delta(sine, deg_sin, delta = 0.000001)
      cosine = DegLut.cos(deg)
      deg_cos = Math.cos(deg * to_radian)
      assert_in_delta(cosine, deg_cos, delta = 0.000001)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
picrate-1.3.0-java test/deglut_spec_test.rb
picrate-1.2.4-java test/deglut_spec_test.rb
picrate-1.2.3-java test/deglut_spec_test.rb
picrate-1.2.2-java test/deglut_spec_test.rb
picrate-1.2.1-java test/deglut_spec_test.rb
picrate-1.2.0-java test/deglut_spec_test.rb
picrate-1.1.0-java test/deglut_spec_test.rb
picrate-1.0.0-java test/deglut_spec_test.rb