Skip to content

Commit

Permalink
fixes to _this var reassignment
Browse files Browse the repository at this point in the history
  • Loading branch information
Anderanged committed Jan 19, 2025
1 parent f149d5b commit 2ddad3b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions addons/bitwise/fnc_bitwiseAND.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ Author:
#define BITGRAB(num,pow) ((floor (num / pow)) mod 2)
#define BASE2LOG(num) ((ln num)*1.44269502162933349609)

_this = _this apply {floor abs _x};
_this sort true;
params [["_min",0,[0]],["_max",1,[0]]];
private _input = _this apply {floor abs _x};
_input sort true;
_input params [["_min",0,[0]],["_max",1,[1]]];

private _end = floor BASE2LOG(_min); //1/ln(2) = 1.44269502162933349609
if (_end >= 24) exitWith {-1}; // precision drop after 2^24 (16777216)
Expand Down
6 changes: 3 additions & 3 deletions addons/bitwise/fnc_bitwiseOR.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ Author:
#define BITGRAB(num,pow) ((floor (num / pow)) mod 2)
#define BASE2LOG(num) ((ln num)*1.44269502162933349609)

_this = _this apply {floor abs _x};
_this sort true;
params [["_min",0,[0]],["_max",1,[0]]];
private _input = _this apply {floor abs _x};
_input sort true;
_input params [["_min",0,[0]],["_max",1,[0]]];

private _end = floor BASE2LOG(_max); //1/ln(2) = 1.44269502162933349609
if (_end > 24) exitWith {-1}; // precision drop after 2^24 (16777216)
Expand Down
6 changes: 3 additions & 3 deletions addons/bitwise/fnc_bitwiseXOR.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ Author:
#define BITGRAB(num,pow) ((floor (num / pow)) mod 2)
#define BASE2LOG(num) ((ln num)*1.44269502162933349609)

_this = _this apply {floor abs _x};
_this sort true;
params [["_min",0,[0]],["_max",1,[0]]];
private _input = _this apply {floor abs _x};
_input sort true;
_input params [["_min",0,[0]],["_max",1,[0]]];

private _end = floor ((ln _max)*1.44269502162933349609); //1/ln(2) = 1.44269502162933349609
if (_end > 24) exitWith {-1}; // precision drop after 2^24 (16777216)
Expand Down

0 comments on commit 2ddad3b

Please sign in to comment.