If you have DeltaX = -15 and DeltaY = -9, then the angle is:
angle = atan(-9 / -15) = atan(0.6) = 0.54 radians
or 31 degrees (= 0.54 * 180 / pi)
I think luksamuk made a mistake; what he calls angleInRadians should be the angle in degrees. An arctan function normally returns the angle in radians, so if you need it in degrees you'll have to convert it.
Apparently the ATan2 function did give you the right angle in degrees directly, though it subtracted 180° because you gave a negative DeltaX. Normally you should calculate like this: DeltaX = X2 - X1, rather than X1 - X2. Same with DeltaY.
If you give positive numbers to the ATan2 function it should give you the right angle.
If you need the angle in radians:
angleInRadians = angleInDegrees * pi / 180
I don't know if you will need it; it depends on what you need the angle for.
By the way, here you end up with a positive angle for a downward slope. I don't know how Sonic games are made, but I'm used to the opposite: positive angles for upwards slopes and negative angles for a downward slopes, because I use a upward Y axis (basically I would have DeltaX = 15 and DeltaY = -9). Maybe that's normal for Sonic games, but you should check to be sure.