A simile.
The phrase "the waves beside them danced" is a comparison of the waves to dancers, using "like" or "as", and it is an example of simile.
9.4m questions
12.2m answers