I am looking an example code for invert sqrt used in quake.
I see a variable of type float: float x = 16;
and then an int variable takes the value of this expression: int i = *(int*)&a;
The way I understand it(from right to left) is that it takes the address of the variable a, typecasts it in to an integer pointer and then takes the value of that pointer and assigns it to i.
when I output the variable i in the console it's a big integer value.
can someone explain more in dept of what is going on here please ?
because I expected the variable i to be 16.