![]() |
VOOZH | about |
The norm() function is defined in the complex header file. This function is used to return the squared magnitude of the complex number z. Syntax:
template<class T> T norm (const complex<T>& z);
Parameter:
Return: It returns the squared magnitude of the complex number.
Time Complexity: O(1)
Auxiliary Space: O(1)
Below programs illustrate the above function:-
Example 1:-
The norm of (5,12) is 169
Example 2:-
The norm of (4,3) is 25