
#pragma once
#ifndef AI_FUZZY_HPP
#define AI_FUZZY_HPP

#include "AI_Log.hpp"



namespace MW4AI
{
	typedef Stuff::Scalar Fuzzy;

	inline Fuzzy And(Fuzzy one, Fuzzy two)
	{
		if (one < two)
		{
			return (one);
		}

		return (two);
	}

	inline Fuzzy And(Fuzzy one, Fuzzy two, Fuzzy three)
	{
		if (one < two)
		{
			return (And(one,three));
		}

		return (And(two,three));
	}

	inline Fuzzy And(Fuzzy one, Fuzzy two, Fuzzy three, Fuzzy four)
	{
		if (one < two)
		{
			return (And(one,three,four));
		}

		return (And(two,three,four));
	}

	inline Fuzzy Or(Fuzzy one, Fuzzy two)
	{
		if (one > two)
		{
			return (one);
		}

		return (two);
	}

	inline Fuzzy Or(Fuzzy one, Fuzzy two, Fuzzy three)
	{
		if (one > two)
		{
			return (Or(one,three));
		}

		return (Or(two,three));
	}

	inline Fuzzy Or(Fuzzy one, Fuzzy two, Fuzzy three, Fuzzy four)
	{
		if (one > two)
		{
			return (Or(one,three,four));
		}

		return (Or(two,three,four));
	}

	inline Fuzzy Not(Fuzzy arg)
	{
		Verify(arg >= 0);
		Verify(arg <= 1);
		return (1 - arg);
	}
};

#endif // AI_FUZZY_HPP