Sha256: 648950e60b65edbf13c6842e48c1adeb3ef69e1522144d8526731d3f6dbaca2c

Contents?: true

Size: 553 Bytes

Versions: 31

Compression:

Stored size: 553 Bytes

Contents

require_relative 'test_helper'
require 'java'
require_relative '../lib/propane'

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

31 entries across 31 versions & 1 rubygems

Version Path
propane-3.4.2-java test/deglut_spec_test.rb
propane-3.4.1-java test/deglut_spec_test.rb
propane-3.4.0-java test/deglut_spec_test.rb
propane-3.3.1-java test/deglut_spec_test.rb
propane-3.3.0-java test/deglut_spec_test.rb
propane-3.2.0-java test/deglut_spec_test.rb
propane-3.1.0.pre-java test/deglut_spec_test.rb
propane-2.9.3-java test/deglut_spec_test.rb
propane-3.0.1.pre-java test/deglut_spec_test.rb
propane-2.9.2-java test/deglut_spec_test.rb
propane-3.0.0.pre-java test/deglut_spec_test.rb
propane-2.9.1-java test/deglut_spec_test.rb
propane-2.9.0-java test/deglut_spec_test.rb
propane-2.7.2-java test/deglut_spec_test.rb
propane-2.8.0.pre-java test/deglut_spec_test.rb
propane-2.7.1-java test/deglut_spec_test.rb
propane-2.7.0-java test/deglut_spec_test.rb
propane-2.6.6-java test/deglut_spec_test.rb
propane-2.6.5.pre-java test/deglut_spec_test.rb
propane-2.6.4-java test/deglut_spec_test.rb