Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.76 KB

rectsect-function.md

File metadata and controls

44 lines (30 loc) · 1.76 KB
title manager ms.date ms.audience ms.topic f1_keywords ms.localizationpriority ms.assetid description
RECTSECT Function
lindalu
03/09/2015
Developer
reference
Vis_DSS.chm82251486
medium
e83343c5-df5f-bf74-f854-6380176693a2
Calculates the sector of a rectangle associated with x and y and returns an integer 0 to 4, indicating the sector.

RECTSECT Function

Calculates the sector of a rectangle associated with x and y and returns an integer 0 to 4, indicating the sector.

Syntax

RECTSECT(width, height, x, y, option )

Parameters

Name Required/Optional Data Type Description
width
Required
String
Width of the rectangle.
height
Required
String
Height of the rectangle.
x
Required
String
An x-coordinate.
y
Required
String
A y-coordinate.
option
Required
Boolean
Specifies how points that fall on the diagonals are treated. Set the value to 0 to use the left and right sectors for points on a diagonal. Set the value to 1 to use the top and bottom sectors for points on a diagonal.

Remarks

Consider a rectangle that has a width and a height, and a point (x,y) from the center point of the rectangle. Draw diagonal lines through the corners of the rectangle to divide it into four sectors and a center point. The sectors 0 through 4 represent the center-point, right, top, left, and bottom respectively.

Sectors 0 through 4 represent the center-point, right, top, left, and bottom respectively

Example

RECTSECT(1 in, 2 in, 1 in, -7 in, 0)

Returns 4.