TMtxInt.Find Method

Int32 Find(Int32 X)

Finds a match for X in object values.

#NameTypeDescription
1XInt32

Returns: Int32 - the index of first matched element. If no matching elements are found, the result is -1.

Remarks:

Compare real value X with all calling object elements.

Examples
using Dew.Math;
using Dew.Math.Units;

namespace Dew.Examples
{
    void Example()
    {
        TMtxInt a;
        MtxVecInt.CreateIt(out a);
        try
        {
            a.SetIt(false, new int[] {2,5,1,6});
            int indes = a.Find(1);  // returns 2 (the arrays are zero based)
        }
        finally
        {
            MtxVecInt.FreeIt(ref a);
        }
    }
}