Operator (? :) returns one of two values depending on the value of the boolean expression. The following is the syntax of a conditional statement.
condition ? first_expression : second_expression;
C # link: http://msdn.microsoft.com/en-us/library/ty67wk28.aspx
In your case, currFrame will be set to 255 if ( diff >= differenceThreshold ) || ( diff <= differenceThresholdNeg ) ( diff >= differenceThreshold ) || ( diff <= differenceThresholdNeg ) - true , otherwise 0 will be assigned.
source share