Export (0) Print
Expand All
Expand Minimize

GRAVITY Function

Last modified: June 17, 2011

Applies to: Office 2013 | Visio 2013

In this article
Syntax
Remarks
Example 1
Example 2
Example 3
Example 4

Calculates a text block's correct angle of rotation for the indicated shape rotation to prevent the text from turning upside down.

GRAVITY(angle,[limit1],[limit2])

Parameters

Name

Required/Optional

Data Type

Description

angle

Required

String

The shape's angle.

limit1

Optional

String

First limit of rotation. Default is 90 degrees.

limit2

Optional

String

Second limit of rotation. Default is 270 degrees.

Return Value

String

The GRAVITY function is usually used in the TxtAngle cell.

The value returned is 180 degrees if angle is between the values specified by limit1 and limit2; otherwise the value returned is 0 degrees.

All of the arguments are automatically normalized between 0 and 360 degrees by the function. If an argument does not specify units, radians are assumed.

GRAVITY(Angle)

Returns 180 degrees if angle is between 90 and 270 degrees; otherwise, returns 0 degrees.

GRAVITY(2)

Returns 180 degrees, because 2 radians is between 90 and 270 degrees.

GRAVITY(100 deg, 110 deg, 290 deg)

Returns 0 degrees.

GRAVITY(100 deg, 290 deg, 110 deg)

Returns 0 degrees.

Show:
© 2014 Microsoft