Sha256: 808ab707b2f97ef98d78e21f98712da653d3467d91503dc7246bf4a114e577fe

Contents?: true

Size: 578 Bytes

Versions: 3

Compression:

Stored size: 578 Bytes

Contents

require File.dirname(__FILE__) + "/../test_helper"

class MathTest < Test::Unit::TestCase

	should "properly take in Degrees and Radians interchangably" do
		light = scene_manager.create_light("Testing Light")

		rad = Radian.new(::Math::PI)
		deg = Degree.new(180)

		# Radians in, Radians out
		light.set_spotlight_inner_angle(rad)
		assert_equal rad, light.get_spotlight_inner_angle

		# Degrees in, Radians out
		light.set_spotlight_inner_angle(deg)
		assert_in_delta rad.value_radians, 
			light.get_spotlight_inner_angle.value_radians, 0.0001
	end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ogre.rb-0.2-i686-linux test/unit/math_test.rb
ogre.rb-0.2-i386-mswin32 test/unit/math_test.rb
ogre.rb-0.2-x86_64-linux test/unit/math_test.rb