-- Purely for boolean returning functions.

local function ToBool(condition)
	return Select(condition,true,false)
end

local function NotToBool(condition)
	return Select(condition,false,true)
end

local function AndToBool(condition,condition2)
	return ToBool(condition) and ToBool(condition2)
end

local function OrToBool(condition,condition2)
	return ToBool(condition) or ToBool(condition2)
end

local function XorToBool(condition,condition2)
	return ToBool(condition) and not ToBool(condition2)
end

local function IsToBool(inval,inval2)
	return inval == inval2
end

local function NilToBool(inval)
	return IsToBool(inval)
end

local function NotNilToBool(inval)
	return NotToBool(NilToBool(inval))
end

local function IsTypeToBool(inval,instr)
	return IsToBool(type(inval),instr)
end

local function IsBooleanToBool(inval)
	return IsTypeToBool(inval,"boolean")
end

local function IsNumberToBool(inval)
	return IsTypeToBool(inval,"number")
end

local function IsStringToBool(inval)
	return IsTypeToBool(inval,"string")
end

local function IsFunctionToBool(inval)
	return IsTypeToBool(inval,"function")
end

local function IsFileToBool(inval)
	return IsTypeToBool(inval,"file")
end

local function IsThreadToBool(inval)
	return IsTypeToBool(inval,"thread")
end

local function IsUserdataToBool(inval)
	return IsTypeToBool(inval,"userdata")
end

local function IsTableToBool(inval)
	return IsTypeToBool(inval,"table")
end

local function IsEqualOrGreaterThanToBool(innum,innum2)
	return innum >= innum2
end