-
Notifications
You must be signed in to change notification settings - Fork 7
Trigonometry
rbotafogo edited this page Apr 11, 2013
·
1 revision
class MDArrayTest < Test::Unit::TestCase
context "Trigonometric Tests" do
setup do
# create a byte array filled with 0's
@a = MDArray.typed_arange("double", 90)
# create double array
@b = MDArray.double([2, 3, 4])
end
#-------------------------------------------------------------------------------------
#
#-------------------------------------------------------------------------------------
should "execute trigonometric functions" do
sin = @a.sin
cos = @a.cos
id = sin**2 + cos**2
assert_equal(1, id)
sec = 1 / @a.cos
end
end
end