Go to: Synopsis. Return value. MEL examples.

Synopsis

float floatArrayContains(float $item, float[] $list)

Return true if array contains the item. The array may contain more than one occurrence of the item. This procedure will return true as soon as it finds one occurrence.

Return value

None

Arguments

Variable Name Variable Type Description
$itemfloatThe float item to search for in the float array.
$listfloat[]A list of float values.

MEL examples

  float $list[] = { 1., 2., 3. };
  // ,Result:, 1 2 3 // 

  int $found = floatArrayContains( 1.0, $list );
  // Result: 1 //

  $found = floatArrayContains( 2.0, $list );
  // Result: 1 //

  $found = floatArrayContains( 0.0, $list );
  // Result: 0 //