I want to send HTML email from my Outlook or Yahoo, Gmail, Hotmail. I wasn't able to find any such option where I could write HTML which will then be rendered at the receiver's end. How can I do that?


Question: Rotating around an object with a given offset
Answer: The math you need to study up on is trigonometry. It is very useful!

If your character is rotated theta radians from "straight up" going clockwise, your top
offset will be:

offset.x += 5*sin(theta);
offset.y += -5*cos(theta);


and the other will be

offset.x += -5*sin(theta);
offset.y += 5*cos(theta);


This is "circle math" (trigonometry) the 5 is the offset you speak of, also called the radius of the circle. A quick sanity check when doing this kind of math is to consider what will happen at 0 radians. Some quick facts of sin and cos:

sin(0) = 0
cos(0) = 1
sin'(0) = 1
cos'(0) = 0


(the second ones are derivatives: sin is initially increasing, cos is flat at the start. Check their graphs.) This and a bit more intuition is helpful for writing graphics code - if we consider the case when theta = 0 we get back your original code. One exception: you are getting the second offset relative to the first offset: I'd avoid doing that and instead make two copies of m_owner-&gt;GetSprite().getPosition(); or reset offset after creating the first projectile.