AngleFormatClass

An object for formatting numbers in an angle format.

Description

AngleFormatis the IAngleFormatinterface coclass whose members determine how the ValueToString method in the associated INumberFormatinterface formats numbers in an _angular_format.****

AngleFormatalso inherits the INumericFormatinterface, so both these interface's properties determine how numbers are formatted.

The AngleFormat object is used for formatting numeric values that represent angles, such as69�. It also allows the conversion between radians and degrees.

Supported Platforms

Windows, Solaris, Linux

Interfaces

Interfaces Description
IAngleFormat Provides access to members that format angles.
IClone Provides access to members that control cloning of objects.
IDocumentVersionSupportGEN Provides access to extend the IObjectStream interface with methods to hande saving objects that did not exist in previous versions of the software.
INumberFormat Provides access to members that format numbers.
INumberFormatOperations Provides access to common operations on formatted numbers.
INumericFormat Provides access to members that format numbers.
IPersist
IPersistStream

Remarks

If the AngleInDegrees**property is not set the same as the DisplayDegrees**property (both of these are Boolean [True/False] properties), a radian-to-degree conversion or vice versa will take place when the ValueToString****method formats the number.

AngleInDegreeshas to do with the ValueToStringargument value. If the value is in degrees, set AngleInDegreesTrue. If AngleInDegreesis False, the argument is assumed to be a radian value.

DisplayDegreeshas to do with the ValueToStringresult. If you want the resulting formatted number to be a degree value, set DisplayDegreesTrue. A degree symbol (�) is also appended to the resulting formatted number. If DisplayDegreesis False, the formatted number is a radian value and no degree symbol is appended.

The corresponding StringToValue**method also uses these two properties. To obtain the numerical value that was used as a parameter to the ValueToStringmethod, make sure the AngleInDegreesand DisplayDegreesproperties are set the same as they were when the ValueToStringmethod was used. These settings may seem like they work in reverse when using the StringToValuemethod, but if you consider that StringToValue**is intended to obtain numerical values from formatted strings, this makes more sense.

The DisplayDegrees property sets or returns an option that tells the ValueToString method in the associated INumberFormat interface whether or not the resulting formatted expression is in degrees or radians. If this property is set to False, the default, then the resulting format is a radian value, and a degree symbol is not appended. If the property is set to True, however, the resulting format is displayed as a degree value with a degree symbol appended to it.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.