microsoft/qdk

Public

mirrored fromhttps://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v1.27.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

katas/content/complex_arithmetic/complex_modulus/Solution.qs

8lines · modepreview

namespace Kata {
    import Std.Math.*;

    function ComplexModulus(x : Complex) : Double {
        let (a, b) = (x.Real, x.Imag);
        return Sqrt(a * a + b * b);
    }
}