Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Rebol Programming/within?

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

USAGE: WITHIN? point offset size DESCRIPTION: Return TRUE if the point is within the rectangle bounds. WITHIN? is a function value. ARGUMENTS point -- XY position (Type: pair) offset -- Offset of area (Type: pair) size -- Size of area (Type: pair) SOURCE CODE within?: func [ {Return TRUE if the point is within the rectangle bounds.} point [pair!] "XY position" offset [pair!] "Offset of area" size [pair!] "Size of area" ][ found? all [ point/x >= offset/x point/y >= offset/y point/x < (offset/x + size/x) point/y < (offset/y + size/y) ] ]