docs: fix link to two's complement wiki page
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
(cherry picked from commit f000be3237
)
This commit is contained in:
parent
666460448d
commit
7773e1ed96
|
@ -390,7 +390,7 @@
|
||||||
<operator name="operator ~">
|
<operator name="operator ~">
|
||||||
<return type="int" />
|
<return type="int" />
|
||||||
<description>
|
<description>
|
||||||
Performs the bitwise [code]NOT[/code] operation on the [int]. Due to [url=https://en.wikipedia.org/wiki/Two%27s_complement/]2's complement[/url], it's effectively equal to [code]-(int + 1)[/code].
|
Performs the bitwise [code]NOT[/code] operation on the [int]. Due to [url=https://en.wikipedia.org/wiki/Two%27s_complement]2's complement[/url], it's effectively equal to [code]-(int + 1)[/code].
|
||||||
[codeblock]
|
[codeblock]
|
||||||
print(~4) # Prints -5
|
print(~4) # Prints -5
|
||||||
print(~(-7)) # Prints 6
|
print(~(-7)) # Prints 6
|
||||||
|
|
Loading…
Reference in New Issue