mIRC Home    About    Download    Register    News    Help

Print Thread
#259870 07/02/17 02:23 AM
Joined: Jul 2014
Posts: 34
S
SykO Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Jul 2014
Posts: 34
I noticed that the width and height of the rect is not included:

//echo -s $inrect(100,100,0,0,100,100)

returns $false

yet:

//echo -s $inrect(0,0,0,0,100,100)

returns $true

I do not know if this is by design, but I feel is an inconsistency where the border should or shouldn't be included.

Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
its because the x and y are included points.

Lets say we divide the width into bars, we want 100 bars(for a 100 pixel width). We then label the bars starting at 0:

0 = first bar
1 = second bar
...and so on until..
98 = 99th bar
99 = 100th bar

so counting the bar lebeled 0, to get a 100pixel wide, it'd be 0-99


I am SReject
My Stuff
Joined: Jul 2014
Posts: 34
S
SykO Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Jul 2014
Posts: 34
Thank you, that helps.


Link Copied to Clipboard