Revert "Revert "Correction of C_times validation""

This reverts commit 4a366967f9.
This commit is contained in:
RonaldoCMP
2020-08-26 14:09:12 +01:00
parent 4a366967f9
commit e8499baba1
5 changed files with 391 additions and 132 deletions

View File

@@ -1175,7 +1175,7 @@ function deriv3(data, h=1, closed=false) =
// Description:
// Multiplies two complex numbers represented by 2D vectors.
function C_times(z1,z2) =
assert( is_vector(z1+z2,2), "Complex numbers should be represented by 2D vectors." )
assert( is_matrix([z1,z2],2,2), "Complex numbers should be represented by 2D vectors" )
[ z1.x*z2.x - z1.y*z2.y, z1.x*z2.y + z1.y*z2.x ];
// Function: C_div()