<p>Am 08.01.2017 17:32 schrieb "Bernd Oppolzer" <<a href="mailto:bernd.oppolzer@t-online.de">bernd.oppolzer@t-online.de</a>>:<br>
><br>
> Am 08.01.2017 um 11:46 schrieb Sven Barth:<br>
>><br>
>> On 08.01.2017 10:55, Ryan Joseph wrote:<br>
>>><br>
>>> I’m going to attempt to translate a perlin noise function (from <a href="https://gist.github.com/Flafla2/f0260a861be0ebdeef76">https://gist.github.com/Flafla2/f0260a861be0ebdeef76</a>) but there are a few things that stopped me from starting.<br>
>>><br>
>>> 1) What is & doing in this assignment? I see this many places in assignments.<br>
>>><br>
>>> int h = hash & 15;<br>
>><br>
>> That's an "and".<br>
><br>
><br>
> Please keep in mind that & is a bitwise and in C<br>
> whereas && is a logical and;<br>
> this makes much difference and has to be implemented or converted differently<br>
> with Pascal, IMO.<br>
><br>
> the closest equivalence to bitwise and in Pascal are set intersections, IMO.</p>
<p>The closest equivalence to bitwise and in Pascal is bitwise and. <br>
The operators "and", "or", "xor" and "not" are logical or bitwise depending on their arguments.</p>
<p>Regards,<br>
Sven</p>