The algorithm is designed to find the location of the incoming point based on either the Width or Height ratios, not both. That is by design, since we “want” the point drift to make sure what we are displaying always ends up on screen no matter what the resolution. Thus finding a “center point” which relies on both width and height ratios working together wont work. Unless you simply call the function twice, once with a point holding your X value with a relativeTo value of Width, and once with a point holding your Y value with a relativeTO value of Height. By using the X value of the first, and the Y value of the second you will have generated a point that is scaled and stepped by both ratios. I do this as well when I need to have such things as screen center points, or things aligned to edges without drift, or when aligning to the edges of other sprites. For example, this should return the center of any screen if you are using a design wireframe of 640x960
ccp(DS_Utility::getPointRelativeToDesignWireframe(CCSize(640,960), DS_Utility::RELATIVETOWIDTH, CCPoint(320, 0)).x,
DS_Utility::getPointRelativeToDesignWireframe(CCSize(640,960), DS_Utility::RELATIVETOHEIGHT, CCPoint(0, 480)).y));
Does that help?