This is a question with some interest and subtlety. Strictly the discriminant of a quadratic expression in one variable ought to be the square of the difference between the roots. e.g. for cubics and higher you take the product of the squares of differences of pairs of roots - for the three roots $a,b,c$ of a cubic it would be $(a-b)^2(b-c)^2(c-a)^2$.
However, the most usual use of discriminant for the quadratic $f(x)=ax^2+bx+c$ is $b^2-4ac$, which is the expression which appears under the square root sign in the quadratic formula. This is $a^2$ times the square of the difference between the roots.
Whichever way you compute it, if the discriminant is zero, the roots are equal. You have to adjust by the factor $a$ as appropriate to context to measure the difference (distance) between the roots using the square root of the discriminant.
Note: the fact that the discriminant is the square of the differences between the roots of a polynomial means that it is a symmetric function of the roots and can be expressed as a function of the coefficients.