By Descartes’ time, rediscovering Snell’s law had became somewhat routine,
with each discoverer finding his own means of deriving the same result,
but the fundamental physics was still uncertain.
Descartes assumed that the speed of light is infinite
and his derivation of the law used the conservation of momentum.
In 1662, Pierre de Fermat
assumed that the speed of light is finite,
rejected Descartes’ work,
and derived the law using the principle of least time.
See also in The book of science:
Readings in wikipedia: