Home >Backend Development >C#.Net Tutorial >What does ⅱ mean in C language?
In C language, ii is a predefined macro that represents the imaginary unit, that is, a complex number whose square root is -1. It is often used in complex number arithmetic, for example to represent the complex number 3 4i as complex_number = 3 4 * ii. Note that ii is predefined and cannot be confused with the integer 2.
In c language, ii
In c language, ii
is a predefined macro that represents an imaginary unit, that is, a complex number whose square root is -1.
Structure
##ii The structure is as follows:
<code class="c">#define ii sqrt(-1)</code>Among them:
#ii
Usually used in complex number operations. For example, the complex number 3 4i can be represented as: <pre class="brush:php;toolbar:false"><code class="c">complex_number = 3 + 4 * ii;</code></pre>
where:
4
is the coefficient of the imaginary part, and ii
is the imaginary unit.
2
.
The above is the detailed content of What does ⅱ mean in C language?. For more information, please follow other related articles on the PHP Chinese website!