{please tell me if i am missing something here}
1. seems common to want to change a component of a complex number.
2. seems common to manipulate complex numbers in a tight loop (simulation)
but whereas you can read a component...
real com.:=Real(cmplx)
imaginary com.:=Imag(cmplx)
i can't see any way to write to a component.
i had hoped, maybe, the compiler would help, but testing shows the,
expected, 5x longer time for this solution/hack....
c+=complex(0,v) // add v to the imaginary part of c
seems re-implementing complex is pretty simple, but its less
clear/documentable and this seems like an omission to me.
BTW couldn't find any help in reflect
BTW c code just does it fine.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/golang-nuts/2de28954-fccb-48f2-9374-950f3ba6d573n%40googlegroups.com.