Using multiple contitions in an if statement?

So I was going over some code from an arduino book where they build a magnetic levitator with IR LEDS and a photo transistor. I was confused by the line where there is a less than sign after the equals sign.

//This section reads ambient light after a certain time interval (count= 1000)
  if (count == 1000)	// If the count equals 1000...
  {
    ambient = readAmbient();	// function call
    count = 0;			// set the count back to zero
    objectPresent = (powerCount < powerCountThreshold); // oddly defining objectPresent... This is what I am confused about
    powerCount = 0;		// set the powerCount back to zero too
  }

I am just wondering about the syntax for using another less tan sign within the if statement after an equals sgin.

Logical Operators

Comparison Operators

== (equal to)
!= (not equal to)
< (less than)

(greater than)
<= (less than or equal to)
= (greater than or equal to)

The result of the comparison (powerCount < powerCountThreshold) is either 0 or 1. This value is then assigned to objectPresent.
It is not an “equals” symbol you are talking about, but an assignement

Thanks! This makes a lot of sense! :art: