Fix theta

This commit is contained in:
Iaroslav Postovalov 2022-02-02 10:00:45 +07:00
parent 8607639876
commit d35516b9af

View File

@ -41,7 +41,7 @@ public val Complex.r: Double
* An angle between vector represented by complex number and X axis.
*/
public val Complex.theta: Double
get() = atan(im / re)
get() = atan2(im, re)
private val PI_DIV_2 = Complex(PI / 2, 0)