Forgot password?
 Create new account
View 176|Reply 1

pgfmathparse中的^^是什么意思

[Copy link]

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

hbghlyj Posted at 2022-12-25 07:27:40 |Read mode
  1. \documentclass{article}
  2. \usepackage{pgf}
  3. \begin{document}
  4. \pgfmathparse{1^^2} \pgfmathresult
  5. \pgfmathparse{2^^2} \pgfmathresult
  6. \end{document}
Copy the Code

输出
57.29578
114.59155
就是1 rad和2 rad的度数
$180/π=57.29578$

为什么是这样呢?
我在TikZ手册只找到
x ^ y  (infix operator; uses the pow function)
    Raises x to the power y.

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

 Author| hbghlyj Posted at 2022-12-25 07:47:44
^^2对应r
^^3对应s
^^4对应t
  1. \documentclass{article}
  2. \usepackage{pgf}
  3. \begin{document}
  4. \pgfmathparse{1r} \pgfmathresult
  5. \end{document}
Copy the Code

1r 也输出57.29578

手机版Mobile version|Leisure Math Forum

2025-4-20 22:18 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list