Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type Complex (a, b) =
- member z.a = a;
- member z.b = b;
- static member (+) (z : Complex, w : Complex) =
- Complex (z.a + w.a, z.b + w.b)
- static member (*) (z : Complex, w : Complex) =
- Complex (z.a * w.a - z.b * w.b, z.b * w.a + z.a * w.b)
- let i = Complex (0, 1)
- let rotateBy90degree = (*) i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement