# x,y of centre region ?

#### dannyboydude

##### New Member
I know
JASS:
``````local real x=GetUnitX(myUnit)
local real y=GetUnitY(myUnit)``````

Is units x + y

How do i get the x + y of the centre of a region?

#### Trollvottel

##### never aging title
easy.

you have the MaxX and the MinX of a region. and how to calculate the average(center) of 2 values? right, add value1 to value2 and divide them by 2:

centerx = (MinX + MaxX) / 2

the same with the y-value

centery = (MinY + MaxY) / 2

#### dannyboydude

##### New Member
im not a gd jasser so how do i get

max x + y
&
min x + y

of a region?

So still how do i get the min and max of x + y for a region ?

JASS:
``````GetRectCentreX(bank1)
GetRectCentreY(bank1)``````

Is that right ?

#### Trollvottel

##### never aging title
hm my TESH says: no

its GetRectCenterX/Y()

#### dannyboydude

##### New Member
hm my TESH says: no

its GetRectCenterX/Y()
Thats what i put
JASS:
``GetRectCentreY(bank1)``

#### Trollvottel

##### never aging title
no you put Centre while I said Center.

do you see the difference?

#### dannyboydude

##### New Member

Thanks for the help

+rep

General chit-chat
Help Users
• No one is chatting at the moment.
• The Helper:
Happy Monday!
• Ghan:
Monday? Speak for yourself.
+2
• The Helper:
Happy Taco Tuesday!
+1
• The Helper:
Tacos!
• The Helper:
Check out the discord for taco pictures You cannot put pictures in this chat
+1
• The Helper:
Damn here come the bots again - 193 online but they are totally invisible to any stats - bunch of bots!'
• C cubanismo:
Re: Taco Tuesday, if there were some way to share edible tacos over the internet, technology would be complete.
+2
• The Helper:
One can only wish!
• tom_mai78101:
I'm back from Taiwan
+1
• The Helper:
I am reorganizing the site I know nobody will notice but I am not done quite yet but the main forums order has been changed and there is a new news category in Other News which is all the remaining headline news stuff not categorized - Headline News is just the stuff that shows on the main page now and the news archive is off the main forums page
• The Helper:
and the real archive lives off of headline news
• The Helper:
Happy Monday!
• V-SNES:
Happy Saturday!
• The Helper:
Happy Saturday Night!
+1