RosettaCodeData/Task/Arithmetic-Complex/Wren/arithmetic-complex.wren

14 lines
384 B
Text
Raw Permalink Normal View History

2023-12-16 21:33:55 -08:00
import "./complex" for Complex
2023-07-01 11:58:00 -04:00
var x = Complex.new(1, 3)
var y = Complex.new(5, 2)
System.print("x = %(x)")
System.print("y = %(y)")
System.print("x + y = %(x + y)")
System.print("x - y = %(x - y)")
System.print("x * y = %(x * y)")
System.print("x / y = %(x / y)")
System.print("-x = %(-x)")
System.print("1 / x = %(x.inverse)")
System.print("x* = %(x.conj)")