进行计算

在定位器中进行基本计算:

  1. Ctrl+K(macOS 上为Cmd+K) 激活定位器。
  2. 输入= ,后加空格。

    定位过滤器列表

  3. 执行计算。

浏览条目,按Enter 键将结果复制到剪贴板

内置功能

除了简单的数学运算,如 ((1 + 2) * 3),还有以下内置函数:

函数用途
abs(x)返回 x 的绝对值
acos(x)以弧度为单位返回 x 的余弦值
asin(x)以弧度为单位返回 x 的余弦值
atan(x)以弧度为单位返回 x 的反正切值
atan2(x, y)返回参数商的余切值
bin(x)返回 x 的二进制表示
ceil(x)返回四舍五入到下一个整数的 x 值
cos(x)返回 x 的余弦值(x 以弧度为单位)
exp(x)将 E 的值返回为 x 的幂
e()返回欧拉数 E(2.71828...)
floor(x)返回四舍五入到下一个整数的 x 值
hex(x)返回 x 的十六进制表示值
log(x)返回 x 的自然对数(以 E 为底
max([value1[, value2[, ...]]])返回给定数字的最大值
min([value1[, value2[, ...]])返回给定数字的最小值
oct(x)返回 x 的八进制表示
pi()返回 PI(3.14159...)
pow(x, y)返回 x 值到 y 的幂的值
random()返回 0 到 1 之间的随机数
round(x)返回四舍五入为下一个整数的 x 值
sin(x)返回 x 的正弦值(x 单位为弧度)
sqrt(x)返回 x 的平方根
tan(x)返回 x 的正切值(x 以弧度为单位)

另请参阅 使用定位器导航定位器

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.