FindClass / loon-simple

Automatically exported from code.google.com/p/loon-simple
0 stars 0 forks source link

package loon.core.geom.Triangle2f #90

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
    public void set(int x, int y, int w, int h) {
        int halfWidth = w / 2;
        int halfHeight = h / 2;
        float top = -halfWidth;
        float bottom = halfHeight;
        float left = -halfHeight;
        float center = 0;
        float right = halfWidth;

        xpoints[0] = x + center;
        xpoints[1] = x + right;
        xpoints[2] = x + left;
        ypoints[0] = y + top;
        ypoints[1] = y + bottom;
        ypoints[2] = y + bottom;
    }
这个函数是不是width,height是不是倒过来了,是不是应该 
w是x轴的,h为y轴?

Original issue reported on code.google.com by caiweixi...@gmail.com on 31 Jul 2013 at 6:12