Sorry, I cant see a big difference
the solution from unit math !!! is
function ifthen(val:boolean;const iftrue:integer; const iffalse:integer= 0) :integer;
begin
if val then result:=iftrue else result:=iffalse;
end;
and my old solution is
function IfFork( Decision :Boolean; YesInt :Integer; NoInt :Integer = 0 ) :Integer;
begin
if Decision then Result := YesInt else Result := NoInt;
end;
sure would be better: IfFork( Decision :Boolean;
const YesInt :Integer;
const NoInt :Integer = 0 ) :Integer;
and because of overloading this with a string and ...-versions in my unit my solution is much more universal
because the ifthen solution in the math unit is limited to integer, int64 and double results
but as a german idiom says: preferences and savours are thankfully different