Bringing two different things together with an explicit word, such as "like", "just as" or "seems". Unlike the metaphor, the comparison makes clear that there are two things.
In The Red and the Black
she thought of passions as we think of the lottery: a sure deception and a happiness pursued by madmen.
With the "as", Madame de Rênal thinks of passions "as we think of the lottery", and the comparison shows that, for her, loving is a gamble for imprudent people, something for others and never for her.
Book I, Chapter 8: Small events, the narrator
For a poor devil like me, thought Julien, without godfathers and without money, there must not be much difference between the seminary and the prison.
Book I, Chapter 24: A capital, Julien Sorel (in thought)
is destroyed forever, just as the feeling that once reigned in my heart; I beg you to accept my apologies for all the follies it led me to commit
Book II, Chapter 20: The Japanese vase, Julien Sorel
Subscription
The explanation of each passage, in every device and in every work, comes with a subscription.