3 Answers
New Answeryou could compute the mean of a bool array, but you'll get a float in range 0, 1 as result (by adding 0 or 1 values abd dividing by array length)... not a boolean (int 0 or 1)... however, you could get the nearest boolean from the mean by rounding it ;)
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message