Re:Why Timothy Cain creator of Fallout left Fallout 2 during...
by zabzonk on Saturday May 27, 2023 @08:54PM
(#36100037)
> x <= y is the same as !(x > y)
i.e. two tests, or perhaps i should say logical operations. i'm not saying don't use '<=', but do check that it is doing what you think it should.
Re:Why Timothy Cain creator of Fallout left Fallout 2 during...
by derefr on Saturday May 27, 2023 @09:05PM
(#36100108)
Let me put it another way: the following are the same code:
if: x <= y, do: foo(), else: nothing()
if: y < x, do: nothing(), else: foo()
Re:Why Timothy Cain creator of Fallout left Fallout 2 during...
by AugurCognito on Sunday May 28, 2023 @03:43AM
(#36102001)
Shouldn't the last statement be:
if: y > x, do: nothing(), else: foo()
Re:Why Timothy Cain creator of Fallout left Fallout 2 during...
by rurban on Sunday May 28, 2023 @10:42AM
(#36104392)
Nope, order of evaluation might matter with impure code.
In a low-level sense, branch-if-greater-or-equal is one instruction even on RISC machines — and not one any more "complex" than branch-if-greater.
In an abstract boolean-algebra sense, x <= y is the same as !(x > y).