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.
8.6m questions
11.2m answers