Hi everyone,

i am able to detect xCompass,yCompass inside the rectangle area with centre xMagnet,yMagnet with sizex = Magnetsizex and sizey=Magnetsizey.

[code]if ( xCompass<(xMagnet+Magnetsizex/2) && xCompass>(xMagnet-(Magnetsizex/2) && yCompass<(yMagnet+Magnetsizey/2) && yCompass>(yMagnet-Magnetsizey/2))
test = true; //  way to tell it is doing this
b[0] = 225;
b[1] = 225;

but when the rectangle area is rotatable by angle cta, i seems to be stuck trying to make the code detect the inside of the area rectangle.

i tried it & probably it has something to do with transformation of the axes,
but it feels rather long in the code

is there a way to do it elegantly? hmmmmmm