diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-08-05 14:30:19 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-08-05 14:30:19 +0900 |
| commit | e41fd5c0d6417f50866acd8e7505b4a3d3d6e79e (patch) | |
| tree | b07f2a8efdae9f7232b71cb4162257705ac31e82 | |
| parent | 0786d86bfedb081185d107c296763d8a03fd4e84 (diff) | |
| parent | 9c78fc8443e366ae9d271b0ccbb2eea1e5fb3cbf (diff) | |
| download | mruby-e41fd5c0d6417f50866acd8e7505b4a3d3d6e79e.tar.gz mruby-e41fd5c0d6417f50866acd8e7505b4a3d3d6e79e.zip | |
Merge pull request #2507 from kkkkkt/add_cos_tan_testcase
added Math.cos and Math.tan test case
| -rw-r--r-- | mrbgems/mruby-math/test/math.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mrbgems/mruby-math/test/math.rb b/mrbgems/mruby-math/test/math.rb index 1cc3a20b0..e9ea07cc1 100644 --- a/mrbgems/mruby-math/test/math.rb +++ b/mrbgems/mruby-math/test/math.rb @@ -23,6 +23,22 @@ assert('Math.sin PI/2') do check_float(Math.sin(Math::PI / 2), 1) end +assert('Math.cos 0') do + check_float(Math.cos(0), 1) +end + +assert('Math.cos PI/2') do + check_float(Math.cos(Math::PI / 2), 0) +end + +assert('Math.tan 0') do + check_float(Math.tan(0), 0) +end + +assert('Math.tan PI/4') do + check_float(Math.tan(Math::PI / 4), 1) +end + assert('Fundamental trig identities') do result = true N = 13 |
