mirror of https://github.com/KLayout/klayout.git
Tests and documentation for dbTrans#is_complex?
This commit is contained in:
parent
20f3733c58
commit
ebe38912a6
|
|
@ -926,10 +926,11 @@ struct cplx_trans_defs
|
|||
"@param m The new magnification"
|
||||
) +
|
||||
method ("is_complex?", &C::is_complex,
|
||||
"@brief Return true if the transformation is a complex one\n"
|
||||
"@brief Returns true if the transformation is a complex one\n"
|
||||
"\n"
|
||||
"If this value is false, the transformation can safely be converted to a simple transformation.\n"
|
||||
"The return value is equivalent to 'is_mag || !is_ortho'.\n"
|
||||
"If this predicate is false, the transformation can safely be converted to a simple transformation.\n"
|
||||
"Otherwise, this conversion will be lossy.\n"
|
||||
"The predicate value is equivalent to 'is_mag || !is_ortho'.\n"
|
||||
"\n"
|
||||
"This method has been introduced in version 0.27.5."
|
||||
) +
|
||||
|
|
|
|||
|
|
@ -155,6 +155,7 @@ class DBTrans_TestClass < TestBase
|
|||
assert_equal( c.is_unity?, false )
|
||||
assert_equal( c.is_ortho?, true )
|
||||
assert_equal( c.is_mag?, false )
|
||||
assert_equal( c.is_complex?, false )
|
||||
assert_equal( c.is_mirror?, true )
|
||||
assert_equal( c.rot, RBA::DCplxTrans::M135.rot )
|
||||
assert_equal( c.s_trans.to_s, "m135 0,0" )
|
||||
|
|
@ -179,6 +180,7 @@ class DBTrans_TestClass < TestBase
|
|||
assert_equal( c.is_unity?, false )
|
||||
assert_equal( c.is_ortho?, true )
|
||||
assert_equal( c.is_mag?, true )
|
||||
assert_equal( c.is_complex?, true )
|
||||
assert_equal( c.is_mirror?, false )
|
||||
assert_equal( c.rot, RBA::DCplxTrans::R0.rot )
|
||||
assert_equal( c.s_trans.to_s, "r0 0,0" )
|
||||
|
|
@ -190,6 +192,7 @@ class DBTrans_TestClass < TestBase
|
|||
assert_equal( c.to_s, "m22.5 *0.75 2.5,-12.5" )
|
||||
assert_equal( c.is_unity?, false )
|
||||
assert_equal( c.is_ortho?, false )
|
||||
assert_equal( c.is_complex?, true )
|
||||
assert_equal( c.is_mag?, true )
|
||||
assert_equal( c.rot, RBA::DCplxTrans::M0.rot )
|
||||
assert_equal( c.s_trans.to_s, "m0 2.5,-12.5" )
|
||||
|
|
|
|||
Loading…
Reference in New Issue