Lean against a wall while on your bike, let your weight 'settle' in the saddle. Let your feet dangle. (Yes, they should be off the floor)
Put the heel of a foot on the pedal when it's all the way down, closest to the floor. If your heel is flat on the pedal, and your knee is straight, then you are VERRRY close to 'just right'.
Not saying this about you (unless you DO it!), but there are a lot of people out there who believe that they are supposed to put both feet flat on the ground while sitting in the saddle. OK, if you're riding a recumbent, or an Electra, but not a standard bike.
I've tried all the technical, mathematical methods, and always come back to the heel-on-pedal method.