Q.ComplexNumber.fromString( n )
It’s kind of gross to see matrix definitions that include new Q.ComplexNumber( blah, blah ) rather than something simple like '-i'. Something like this within the Matrix constructor might be nice:
if( typeof n === 'string' ){
n = Q.ComplexNumber.fromString( n )
}
But that means having to write Q.ComplexNumber.fromString( n )...
So this issue is a note-to-self to write that!
An alternative -- pass in an ordered pair (a, b) for the value a+bi.
@marwahaha I’m confused: Are you suggesting something that differs from the way Q.ComplexNumber has worked from the beginning? (To create a complex number, call new Q.ComplexNumber( real, imaginary ).) I’m suggesting in addition to this existing functionality it would be nice to be able to pass a more human-readable String as an argument that would then be parsed into its correct components. And then Q.Matrix could take advantage of that as well: https://github.com/stewdio/q.js/issues/38
Oh, I see the point here. Disregard my comment; thanks for clarifying.