Anonymous user
Arithmetic/Complex: Difference between revisions
→{{header|Scala}}: - add fromPolar
(→{{header|Scala}}: - add fromPolar) |
|||
Line 1,969:
object Complex {
def apply(s: String) = new Complex(s)
def fromPolar(rho:Double, theta:Double) = Complex(rho*math.cos(theta), rho*math.sin(theta))
}
}</lang>
|