In TeX, single $ means "change to math typesetting mode" (treat it as"inline" math). The double $$ is similar, just it typesets it as a separate block of math/figure (it adds alignment, spacing, etc.).
I'd expect similar behaviour.