Skip to content
本页内容

Degrees (方法)

将弧度转换为度。

参数

属性数据类型必填说明
Arg1float必填Angle - 要转换的以弧度表示的角度。

返回值

float

示例

python
#本示例为B1等单元格分别赋值,并使用Degrees方法将弧度转换为度
def test():
    Range("B1").Value2 = 60
    Range("B2").Value2 = 30
    Range("B3").Value2 = 10.5
    degrees1 = Application.WorksheetFunction.Degrees(Range("B1").Value2)
    degrees2 = Application.WorksheetFunction.Degrees(Range("B2").Value2)
    degrees3 = Application.WorksheetFunction.Degrees(Range("B3").Value2)
    print(degrees1)
    print(degrees2)
    print(degrees3)
python
#本示例使用Degrees方法将弧度转换为度,并将结果赋值于D3等单元格
def test():
    Range("D3").Value2 = Application.WorksheetFunction.Degrees(-100)
    Range("D4").Value2 = Application.WorksheetFunction.Degrees(87)
    Range("D5").Value2 = Application.WorksheetFunction.Degrees(43.5)