Two method aliases in RBA::Vector/DVector to provide Point compatibility

This commit is contained in:
Matthias Koefferlein
2017-10-29 19:11:50 +01:00
parent c1377cc276
commit 52e893ae17
2 changed files with 10 additions and 2 deletions
+6
View File
@@ -50,6 +50,9 @@ class DBVector_TestClass < TestBase
assert_equal( a.y.to_s, "-17.0" )
assert_equal( (a.length - Math::sqrt(17 * 17 + 1 * 1)).abs < 1e-12, true )
assert_equal( (a.sq_length - (17 * 17 + 1 * 1)).abs < 1e-12, true )
assert_equal( (a.abs - Math::sqrt(17 * 17 + 1 * 1)).abs < 1e-12, true )
assert_equal( (a.sq_abs - (17 * 17 + 1 * 1)).abs < 1e-12, true )
b.x = a.x
b.y = a.y
@@ -101,6 +104,9 @@ class DBVector_TestClass < TestBase
assert_equal( a.y.to_s, "-17" )
assert_equal( (a.length - Math::sqrt(17 * 17 + 1 * 1)).abs < 1e-12, true )
assert_equal( (a.sq_length - (17 * 17 + 1 * 1)).abs < 1e-12, true )
assert_equal( (a.abs - Math::sqrt(17 * 17 + 1 * 1)).abs < 1e-12, true )
assert_equal( (a.sq_abs - (17 * 17 + 1 * 1)).abs < 1e-12, true )
b.x = a.x
b.y = a.y