If...Then Executes Each time, even if false.

This is a simple program to read and display the current voltage on analog pin 0 and print the current voltage and maximum voltage read.

The problem I'm having is that the maximum value is recalculated each time even if the current reading is less than the maximum reading so the maximum voltage is always equal to the current voltage. What am I doing wrong?

Here is my code:

const int analogPin = 0; // replace 0 with analog pin
  int sensorReading, maxReading;
  int adcVal, i, numSamples = 1;
  float maxVoltage, voltage;
void setup()
  maxVoltage == 0.00;
  maxReading == 0;

void loop()
  sensorReading =(analogRead(analogPin));
  if (sensorReading > maxReading);              //Do we have a new maximum reading?
  {                                              // begining of If Then 
    maxReading = sensorReading;                   //if true then make the current sensor reading the new maximum reading
    maxVoltage = maxReading * (5.00/1023.00);     //calculate new maximum voltage
  }                                             //end of If Then
  voltage = sensorReading * (5.00/1023.00);     //calculate current voltage
  Serial.print("current voltage is ");Serial.print(voltage); Serial.print("     Max Voltage is "); Serial.print(maxVoltage);

The semicolon after the compare says the comparison is over. The stuff inside the curly braces executes as if the compare had not happened.

Ahhhhhh. I knew it had to be something really simple. It would have taken me a long time to realize that. Thanks.

The double equals aren’t doing anything to those globals up the top..

maxVoltage == 0.00;
maxReading == 0;

Yes, I realized that after I posted it. That was a typo.