x = (x == x.abs) ? x.abs : x
y = (y == y.abs) ? y.abs : y
これ何したいの