I once jerked off in the middle of class because I was horny af. Had one hand taking notes, and another in my pocket rubbing my cock and playing with my balls. I was rubbing slowly, careful not to attract any attention, and eventually I jizzed. I was around at least 20 people and fully clothed. My underpants were soaking wet but none of it seeped through so you couldn't see anything on my pants.
Cleaned up after class in a bathroom nearby. I had friends in that class and they never brought it up, so as far as I know, nobody noticed.