Sha256: 76579291eb304b1d2fa2499e0e08ed46786c9346845316fa68b1d06799703a1f

Contents?: true

Size: 668 Bytes

Versions: 1

Compression:

Stored size: 668 Bytes

Contents

# -*- coding: utf-8 -*-
require "sixarm_ruby_geometry_test"
require "sixarm_ruby_geometry/indexable/yaw"
require "sixarm_ruby_geometry_test/fake"

module Indexable
  class YawTest < Minitest::Test

    def test_0
      assert(::Indexable::Yaw)
    end

    require "matrix"
    class C < Vector
      include ::Indexable::Yaw
    end

    DELTA = 0.00001

    def test_yaw
      assert_in_delta(Math::PI *  0.0, C[ 1,  0, fake_f].yaw, DELTA)
      assert_in_delta(Math::PI * -0.5, C[ 0,  1, fake_f].yaw, DELTA)
      assert_in_delta(Math::PI *  1.0, C[-1,  0, fake_f].yaw, DELTA)
      assert_in_delta(Math::PI *  0.5, C[ 0, -1, fake_f].yaw, DELTA)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sixarm_ruby_geometry-4.0.0 test/sixarm_ruby_geometry_test/indexable/yaw_test.rb