2024-08-28 12:03:02 +08:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="zh-Hans" dir="ltr">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
2024-08-28 20:35:22 +08:00
|
|
|
|
<title>mbcp.mp_math.angle | MBCP docs</title>
|
2024-08-28 12:03:02 +08:00
|
|
|
|
<meta name="description" content="一个用于Minecraft粒子计算和生成的库">
|
|
|
|
|
<meta name="generator" content="VitePress v1.3.4">
|
|
|
|
|
<link rel="preload stylesheet" href="/assets/style.Bb0QBJmh.css" as="style">
|
|
|
|
|
|
|
|
|
|
<script type="module" src="/assets/app.l1Ut0uce.js"></script>
|
|
|
|
|
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
|
|
|
|
<link rel="modulepreload" href="/assets/chunks/theme.BPuUWxkA.js">
|
|
|
|
|
<link rel="modulepreload" href="/assets/chunks/framework.BV61Qrc0.js">
|
2024-08-28 21:28:34 +08:00
|
|
|
|
<link rel="modulepreload" href="/assets/api_mp_math_angle.md.DKMXAFbW.lean.js">
|
2024-08-28 12:03:02 +08:00
|
|
|
|
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
|
|
|
|
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
2024-08-28 21:28:34 +08:00
|
|
|
|
<div id="app"><div class="Layout" data-v-8e016544><!--[--><!--]--><!--[--><span tabindex="-1" data-v-efdf7a7d></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-efdf7a7d> Skip to content </a><!--]--><!----><header class="VPNav" data-v-8e016544 data-v-0c3b3583><div class="VPNavBar has-sidebar top" data-v-0c3b3583 data-v-af8d762d><div class="wrapper" data-v-af8d762d><div class="container" data-v-af8d762d><div class="title" data-v-af8d762d><div class="VPNavBarTitle has-sidebar" data-v-af8d762d data-v-73c882b0><a class="title" href="/" data-v-73c882b0><!--[--><!--]--><!----><span data-v-73c882b0>MBCP docs</span><!--[--><!--]--></a></div></div><div class="content" data-v-af8d762d><div class="content-body" data-v-af8d762d><!--[--><!--]--><div class="VPNavBarSearch search" data-v-af8d762d><!----></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-af8d762d data-v-ae469694><span id="main-nav-aria-label" class="visually-hidden" data-v-ae469694> Main Navigation </span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/guide.html" tabindex="0" data-v-ae469694 data-v-4ca2fdac><!--[--><span data-v-4ca2fdac>快速开始</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/api/" tabindex="0" data-v-ae469694 data-v-4ca2fdac><!--[--><span data-v-4ca2fdac>API文档</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/demo/" tabindex="0" data-v-ae469694 data-v-4ca2fdac><!--[--><span data-v-4ca2fdac>实例</span><!--]--></a><!--]--><!--]--></nav><div class="VPFlyout VPNavBarTranslations translations" data-v-af8d762d data-v-ba521018 data-v-6d56b0ed><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="Change language" data-v-6d56b0ed><span class="text" data-v-6d56b0ed><span class="vpi-languages option-icon" data-v-6d56b0ed></span><!----><span class="vpi-chevron-down text-icon" data-v-6d56b0ed></span></span></button><div class="menu" data-v-6d56b0ed><div class="VPMenu" data-v-6d56b0ed data-v-36a6a4be><!----><!--[--><!--[--><div class="items" data-v-ba521018><p class="title" data-v-ba521018>简体中文</p><!--[--><div class="VPMenuLink" data-v-ba521018 data-v-a9b5eada><a class="VPLink link" href="/en/api/mp_math/angle.html" data-v-a9b5eada><!--[-->English<!--]--></a></div><!--]--></div><!--]--><!--]--></div></div></div><div class="VPNavBarAppearance appearance" data-v-af8d762d data-v-fd625bab><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="Switch to dark theme" aria-checked="false" data-v-fd625bab data-v-38c704f2 data-v-793caf05><span class="check" data-v-793caf05><span class="icon" data-v-793caf05><!--[--><span class="vpi-sun sun" data-v-38c704f2></span><span class="vpi-moon moon" data-v-38c704f2></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-af8d762d data-v-9b3d2141 data-v-0ada25a4><!--[--><a class="VPSocialLink no-icon" href="https://github.com/snowykami/mbcp" aria-label="github" target="_blank" rel="noopener" data-v-0ada25a4 data-v-36d54f99><span class="vpi-social-github" /></a><!--]--></div><div class="VPFlyout VPNavBarExtra extra" data-v-af8d762d data-v-8ac0e455 data-v-6d56b0ed><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-6d56b0ed><span class="vpi-more-horizontal icon" data-v-6d56b0ed></span></button><div class="menu" data-v-6d56b0ed><div class="VPMenu" data-v-6d56b0ed data-v-36a6a4be><!----><!--[--><!--[--><div class="group translations" data-v-8ac0e455><p class="trans-title" data-v-8ac0e455>简体中文</p><!--[--><div class="VPMenuLink" data-v-8ac0e455 data-v-a9b5eada><a class="VPLink link" href="/en/api/mp_math/angle.html" data-v-a9b5eada><!--[-->English<!--]--></a></div><!--]--></div><div class="group" data-v-8ac0e455><div class="item appearance" data-v-8ac0e455><p class="label" data-v-8ac0e455>Appearance</p><div class="appearance-action" data-v-8ac0e455><button class="VPSwitch VPSwitchAppearance" type="button"
|
2024-08-28 12:03:02 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 任意角度。</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> value: 角度或弧度值</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> is_radian: 是否为弧度,默认为否</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> is_radian:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.radian </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> value</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> else</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
2024-08-28 21:28:34 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.radian </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> value </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> PI</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> /</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 180</span></span></code></pre></div></details><h3 id="property" tabindex="-1"><code>@property</code> <a class="header-anchor" href="#property" aria-label="Permalink to "`@property`""></a></h3><h3 id="def-complementary-self-anyangle" tabindex="-1"><em>def</em> <code>complementary(self) -> 'AnyAngle'</code> <a class="header-anchor" href="#def-complementary-self-anyangle" aria-label="Permalink to "*def* `complementary(self) -> 'AnyAngle'`""></a></h3><p>余角:两角的和为90°。</p><p>返回:</p><ul><li>余角</li></ul><details><summary>源码</summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">property</span></span>
|
2024-08-28 12:03:02 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> complementary</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -> </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'AnyAngle'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 余角:两角的和为90°。</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Returns:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 余角</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
2024-08-28 21:28:34 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> AnyAngle(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">PI</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> /</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> -</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.minimum_positive.radian, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">is_radian</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">True</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h3 id="property-1" tabindex="-1"><code>@property</code> <a class="header-anchor" href="#property-1" aria-label="Permalink to "`@property`""></a></h3><h3 id="def-supplementary-self-anyangle" tabindex="-1"><em>def</em> <code>supplementary(self) -> 'AnyAngle'</code> <a class="header-anchor" href="#def-supplementary-self-anyangle" aria-label="Permalink to "*def* `supplementary(self) -> 'AnyAngle'`""></a></h3><p>补角:两角的和为180°。</p><p>返回:</p><ul><li>补角</li></ul><details><summary>源码</summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">property</span></span>
|
2024-08-28 12:03:02 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> supplementary</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -> </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'AnyAngle'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 补角:两角的和为180°。</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Returns:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 补角</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
2024-08-28 21:28:34 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> AnyAngle(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">PI</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> -</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.minimum_positive.radian, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">is_radian</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">True</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h3 id="property-2" tabindex="-1"><code>@property</code> <a class="header-anchor" href="#property-2" aria-label="Permalink to "`@property`""></a></h3><h3 id="def-degree-self-float" tabindex="-1"><em>def</em> <code>degree(self) -> float</code> <a class="header-anchor" href="#def-degree-self-float" aria-label="Permalink to "*def* `degree(self) -> float`""></a></h3><p>角度。</p><p>返回:</p><ul><li>弧度</li></ul><details><summary>源码</summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">property</span></span>
|
2024-08-28 12:03:02 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> degree</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 角度。</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Returns:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 弧度</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
2024-08-28 21:28:34 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.radian </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 180</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> /</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> PI</span></span></code></pre></div></details><h3 id="property-3" tabindex="-1"><code>@property</code> <a class="header-anchor" href="#property-3" aria-label="Permalink to "`@property`""></a></h3><h3 id="def-minimum-positive-self-anyangle" tabindex="-1"><em>def</em> <code>minimum_positive(self) -> 'AnyAngle'</code> <a class="header-anchor" href="#def-minimum-positive-self-anyangle" aria-label="Permalink to "*def* `minimum_positive(self) -> 'AnyAngle'`""></a></h3><p>最小正角。</p><p>返回:</p><ul><li>最小正角度</li></ul><details><summary>源码</summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">property</span></span>
|
2024-08-28 12:03:02 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> minimum_positive</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -> </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'AnyAngle'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 最小正角。</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Returns:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 最小正角度</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
2024-08-28 21:28:34 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> AnyAngle(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.radian </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">%</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">2</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> *</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> PI</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">))</span></span></code></pre></div></details><h3 id="property-4" tabindex="-1"><code>@property</code> <a class="header-anchor" href="#property-4" aria-label="Permalink to "`@property`""></a></h3><h3 id="def-maximum-negative-self-anyangle" tabindex="-1"><em>def</em> <code>maximum_negative(self) -> 'AnyAngle'</code> <a class="header-anchor" href="#def-maximum-negative-self-anyangle" aria-label="Permalink to "*def* `maximum_negative(self) -> 'AnyAngle'`""></a></h3><p>最大负角。</p><p>返回:</p><ul><li>最大负角度</li></ul><details><summary>源码</summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">property</span></span>
|
2024-08-28 12:03:02 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> maximum_negative</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -> </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'AnyAngle'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 最大负角。</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Returns:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 最大负角度</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
2024-08-28 21:28:34 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> AnyAngle(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.radian </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">%</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">2</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> *</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> PI</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">), </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">is_radian</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">True</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h3 id="property-5" tabindex="-1"><code>@property</code> <a class="header-anchor" href="#property-5" aria-label="Permalink to "`@property`""></a></h3><h3 id="def-sin-self-float" tabindex="-1"><em>def</em> <code>sin(self) -> float</code> <a class="header-anchor" href="#def-sin-self-float" aria-label="Permalink to "*def* `sin(self) -> float`""></a></h3><p>正弦值。</p><p>返回:</p><ul><li>正弦值</li></ul><details><summary>源码</summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">property</span></span>
|
2024-08-28 12:03:02 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> sin</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 正弦值。</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Returns:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 正弦值</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
2024-08-28 21:28:34 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> math.sin(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.radian)</span></span></code></pre></div></details><h3 id="property-6" tabindex="-1"><code>@property</code> <a class="header-anchor" href="#property-6" aria-label="Permalink to "`@property`""></a></h3><h3 id="def-cos-self-float" tabindex="-1"><em>def</em> <code>cos(self) -> float</code> <a class="header-anchor" href="#def-cos-self-float" aria-label="Permalink to "*def* `cos(self) -> float`""></a></h3><p>余弦值。</p><p>返回:</p><ul><li>余弦值</li></ul><details><summary>源码</summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">property</span></span>
|
2024-08-28 12:03:02 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> cos</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 余弦值。</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Returns:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 余弦值</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
2024-08-28 21:28:34 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> math.cos(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.radian)</span></span></code></pre></div></details><h3 id="property-7" tabindex="-1"><code>@property</code> <a class="header-anchor" href="#property-7" aria-label="Permalink to "`@property`""></a></h3><h3 id="def-tan-self-float" tabindex="-1"><em>def</em> <code>tan(self) -> float</code> <a class="header-anchor" href="#def-tan-self-float" aria-label="Permalink to "*def* `tan(self) -> float`""></a></h3><p>正切值。</p><p>返回:</p><ul><li>正切值</li></ul><details><summary>源码</summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">property</span></span>
|
2024-08-28 12:03:02 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> tan</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 正切值。</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Returns:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 正切值</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
2024-08-28 21:28:34 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> math.tan(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.radian)</span></span></code></pre></div></details><h3 id="property-8" tabindex="-1"><code>@property</code> <a class="header-anchor" href="#property-8" aria-label="Permalink to "`@property`""></a></h3><h3 id="def-cot-self-float" tabindex="-1"><em>def</em> <code>cot(self) -> float</code> <a class="header-anchor" href="#def-cot-self-float" aria-label="Permalink to "*def* `cot(self) -> float`""></a></h3><p>余切值。</p><p>返回:</p><ul><li>余切值</li></ul><details><summary>源码</summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">property</span></span>
|
2024-08-28 12:03:02 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> cot</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 余切值。</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Returns:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 余切值</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
2024-08-28 21:28:34 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> /</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> math.tan(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.radian)</span></span></code></pre></div></details><h3 id="property-9" tabindex="-1"><code>@property</code> <a class="header-anchor" href="#property-9" aria-label="Permalink to "`@property`""></a></h3><h3 id="def-sec-self-float" tabindex="-1"><em>def</em> <code>sec(self) -> float</code> <a class="header-anchor" href="#def-sec-self-float" aria-label="Permalink to "*def* `sec(self) -> float`""></a></h3><p>正割值。</p><p>返回:</p><ul><li>正割值</li></ul><details><summary>源码</summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">property</span></span>
|
2024-08-28 12:03:02 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> sec</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 正割值。</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Returns:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 正割值</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
2024-08-28 21:28:34 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> /</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> math.cos(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.radian)</span></span></code></pre></div></details><h3 id="property-10" tabindex="-1"><code>@property</code> <a class="header-anchor" href="#property-10" aria-label="Permalink to "`@property`""></a></h3><h3 id="def-csc-self-float" tabindex="-1"><em>def</em> <code>csc(self) -> float</code> <a class="header-anchor" href="#def-csc-self-float" aria-label="Permalink to "*def* `csc(self) -> float`""></a></h3><p>余割值。</p><p>返回:</p><ul><li>余割值</li></ul><details><summary>源码</summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">property</span></span>
|
2024-08-28 12:03:02 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> csc</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 余割值。</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Returns:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 余割值</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
2024-08-28 21:28:34 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> /</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> math.sin(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.radian)</span></span></code></pre></div></details><h3 id="def-add-self-other-anyangle-anyangle" tabindex="-1"><em>def</em> <code>__add__(self, other: 'AnyAngle') -> 'AnyAngle'</code> <a class="header-anchor" href="#def-add-self-other-anyangle-anyangle" aria-label="Permalink to "*def* `__add__(self, other: 'AnyAngle') -> 'AnyAngle'`""></a></h3><details><summary>源码</summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __add__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'AnyAngle'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'AnyAngle'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> AnyAngle(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.radian </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.radian, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">is_radian</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">True</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h3 id="def-eq-self-other" tabindex="-1"><em>def</em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#def-eq-self-other" aria-label="Permalink to "*def* `__eq__(self, other)`""></a></h3><details><summary>源码</summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __eq__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other):</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> approx(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.radian, other.radian)</span></span></code></pre></div></details><h3 id="def-sub-self-other-anyangle-anyangle" tabindex="-1"><em>def</em> <code>__sub__(self, other: 'AnyAngle') -> 'AnyAngle'</code> <a class="header-anchor" href="#def-sub-self-other-anyangle-anyangle" aria-label="Permalink to "*def* `__sub__(self, other: 'AnyAngle') -> 'AnyAngle'`""></a></h3><details><summary>源码</summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __sub__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'AnyAngle'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'AnyAngle'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> AnyAngle(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.radian </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.radian, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">is_radian</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">True</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h3 id="def-mul-self-other-float-anyangle" tabindex="-1"><em>def</em> <code>__mul__(self, other: float) -> 'AnyAngle'</code> <a class="header-anchor" href="#def-mul-self-other-float-anyangle" aria-label="Permalink to "*def* `__mul__(self, other: float) -> 'AnyAngle'`""></a></h3><details><summary>源码</summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __mul__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'AnyAngle'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> AnyAngle(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.radian </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">is_radian</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">True</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h3 id="def-repr-self" tabindex="-1"><em>def</em> <code>__repr__(self)</code> <a class="header-anchor" href="#def-repr-self" aria-label="Permalink to "*def* `__repr__(self)`""></a></h3><details><summary>源码</summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __repr__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self):</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'AnyAngle(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.radian</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">, is_radian=True)'</span></span></code></pre></div></details><h3 id="def-str-self" tabindex="-1"><em>def</em> <code>__str__(self)</code> <a class="header-anchor" href="#def-str-self" aria-label="Permalink to "*def* `__str__(self)`""></a></h3><details><summary>源码</summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __str__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self):</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'AnyAngle(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.degree</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">° or </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.radian</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> rad)'</span></span></code></pre></div></details><h3 id="overload" tabindex="-1"><code>@overload</code> <a class="header-anchor" href="#overload" aria-label="Permalink to "`@overload`""></a></h3><h3 id="def-truediv-self-other-float-anyangle" tabindex="-1"><em>def</em> <code>__truediv__(self, other: float) -> 'AnyAngle'</code> <a class="header-anchor" href="#def-truediv-self-other-float-anyangle" aria-label="Permalink to "*def* `__truediv__(self, other: float) -> 'AnyAngle'`""></a></h3><details><summary>源码</summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@overload</span></span>
|
2024-08-28 20:35:22 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __truediv__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'AnyAngle'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
2024-08-28 21:28:34 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h3 id="overload-1" tabindex="-1"><code>@overload</code> <a class="header-anchor" href="#overload-1" aria-label="Permalink to "`@overload`""></a></h3><h3 id="def-truediv-self-other-anyangle-float" tabindex="-1"><em>def</em> <code>__truediv__(self, other: 'AnyAngle') -> float</code> <a class="header-anchor" href="#def-truediv-self-other-anyangle-float" aria-label="Permalink to "*def* `__truediv__(self, other: 'AnyAngle') -> float`""></a></h3><details><summary>源码</summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@overload</span></span>
|
2024-08-28 20:35:22 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __truediv__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'AnyAngle'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
2024-08-28 21:28:34 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h3 id="def-truediv-self-other" tabindex="-1"><em>def</em> <code>__truediv__(self, other)</code> <a class="header-anchor" href="#def-truediv-self-other" aria-label="Permalink to "*def* `__truediv__(self, other)`""></a></h3><details><summary>源码</summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __truediv__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other):</span></span>
|
2024-08-28 20:35:22 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other, AnyAngle):</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.radian </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.radian</span></span>
|
|
|
|
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> AnyAngle(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.radian </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">is_radian</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">True</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details></div></div></main><footer class="VPDocFooter" data-v-aa782c77 data-v-f33b051d><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-f33b051d><span class="visually-hidden" id="doc-footer-aria-label" data-v-f33b051d>Pager</span><div class="pager" data-v-f33b051d><a class="VPLink link pager-link prev" href="/api/mp_math/index.html" data-v-f33b051d><!--[--><span class="desc" data-v-f33b051d>Previous page</span><span class="title" data-v-f33b051d>mbcp.mp_math</span><!--]--></a></div><div class="pager" data-v-f33b051d><a class="VPLink link pager-link next" href="/api/mp_math/const.html" data-v-f33b051d><!--[--><span class="desc" data-v-f33b051d>Next page</span><span class="title" data-v-f33b051d>mbcp.mp_math.const</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
2024-08-28 21:28:34 +08:00
|
|
|
|
<script>window.__VP_HASH_MAP__=JSON.parse("{\"api-ex.md\":\"DOsKaL8H\",\"api_index.md\":\"BvazTqTB\",\"api_mp_math_angle.md\":\"DKMXAFbW\",\"api_mp_math_const.md\":\"Bc1LxtcU\",\"api_mp_math_equation.md\":\"BXP6BUSg\",\"api_mp_math_index.md\":\"4P0hk6gb\",\"api_mp_math_line.md\":\"CzpblksR\",\"api_mp_math_mp_math_typing.md\":\"BHJOAxTl\",\"api_mp_math_plane.md\":\"CZDq9vG4\",\"api_mp_math_point.md\":\"BJ9u2OpE\",\"api_mp_math_segment.md\":\"B0wRl0bP\",\"api_mp_math_utils.md\":\"DPDde5hx\",\"api_mp_math_vector.md\":\"BBiKQwmG\",\"api_particle_index.md\":\"BRCSxC3e\",\"api_presets_index.md\":\"Dl6Ss91J\",\"api_presets_model_index.md\":\"BNeuRwjr\",\"en_api_index.md\":\"Bgu-LD1B\",\"en_api_mp_math_angle.md\":\"DYZo7hBD\",\"en_api_mp_math_const.md\":\"DfcWuGeV\",\"en_api_mp_math_equation.md\":\"Bsq2lQHW\",\"en_api_mp_math_index.md\":\"DrjDUYBY\",\"en_api_mp_math_line.md\":\"CP3RuJkk\",\"en_api_mp_math_mp_math_typing.md\":\"Dh1by9kw\",\"en_api_mp_math_plane.md\":\"eYXZ3wvh\",\"en_api_mp_math_point.md\":\"DNEIRDFB\",\"en_api_mp_math_segment.md\":\"CUQFMm0Q\",\"en_api_mp_math_utils.md\":\"D6PiZ35J\",\"en_api_mp_math_vector.md\":\"BaY0-PMv\",\"en_api_particle_index.md\":\"CmC1QX5o\",\"en_api_presets_index.md\":\"CZ5hl_7D\",\"en_api_presets_model_index.md\":\"gEUCj87b\",\"index.md\":\"CJvRmMfL\",\"ja_api_index.md\":\"4BnflFIm\",\"ja_api_mp_math_angle.md\":\"_xBKQuir\",\"ja_api_mp_math_const.md\":\"CQY-Qdbh\",\"ja_api_mp_math_equation.md\":\"DVrOBmbN\",\"ja_api_mp_math_index.md\":\"CSAMHYsB\",\"ja_api_mp_math_line.md\":\"B4_v4TOY\",\"ja_api_mp_math_mp_math_typing.md\":\"CeASNaiE\",\"ja_api_mp_math_plane.md\":\"BSSDxRzL\",\"ja_api_mp_math_point.md\":\"DvD45PEI\",\"ja_api_mp_math_segment.md\":\"oiONXysZ\",\"ja_api_mp_math_utils.md\":\"Bc0yJ70T\",\"ja_api_mp_math_vector.md\":\"TVqfIGHG\",\"ja_api_particle_index.md\":\"E2YnH7EN\",\"ja_api_presets_index.md\":\"ATGcHt9d\",\"ja_api_presets_model_index.md\":\"DJGptHhw\",\"md-ex.md\":\"BX0WqOqv\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"MBCP docs\",\"description\":\"MBCP library docs\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/snowykami/mbcp\"}],\"sidebar\":{\"/api/\":[{\"text\":\"api\",\"items\":[{\"text\":\"mbcp\",\"link\":\"/api/index.md\"},{\"text\":\"mp_math\",\"items\":[{\"text\":\"mbcp.mp_math\",\"link\":\"/api/mp_math/index.md\"},{\"text\":\"mbcp.mp_math.angle\",\"link\":\"/api/mp_math/angle.md\"},{\"text\":\"mbcp.mp_math.const\",\"link\":\"/api/mp_math/const.md\"},{\"text\":\"mbcp.mp_math.equation\",\"link\":\"/api/mp_math/equation.md\"},{\"text\":\"mbcp.mp_math.line\",\"link\":\"/api/mp_math/line.md\"},{\"text\":\"mbcp.mp_math.mp_math_typing\",\"link\":\"/api/mp_math/mp_math_typing.md\"},{\"text\":\"mbcp.mp_math.plane\",\"link\":\"/api/mp_math/plane.md\"},{\"text\":\"mbcp.mp_math.point\",\"link\":\"/api/mp_math/point.md\"},{\"text\":\"mbcp.mp_math.segment\",\"link\":\"/api/mp_math/segment.md\"},{\"text\":\"mbcp.mp_math.utils\",\"link\":\"/api/mp_math/utils.md\"},{\"text\":\"mbcp.mp_math.vector\",\"link\":\"/api/mp_math/vector.md\"}]},{\"text\":\"particle\",\"items\":[{\"text\":\"mbcp.particle\",\"link\":\"/api/particle/index.md\"}]},{\"text\":\"presets\",\"items\":[{\"text\":\"mbcp.presets\",\"link\":\"/api/presets/index.md\"},{\"text\":\"model\",\"items\":[{\"text\":\"mbcp.presets.model\",\"link\":\"/api/presets/model/index.md\"}]}]}]}],\"/en/\":[{\"text\":\"en\",\"items\":[{\"text\":\"api\",\"items\":[{\"text\":\"mbcp\",\"link\":\"/en/api/index.md\"},{\"text\":\"mp_math\",\"items\":[{\"text\":\"mbcp.mp_math\",\"link\":\"/en/api/mp_math/index.md\"},{\"text\":\"mbcp.mp_math.angle\",\"link\":\"/en/api/mp_math/angle.md\"},{\"text\":\"mbcp.mp_math.const\",\"link\":\"/en/api/mp_math/const.md\"},{\"text\":\"mbcp.mp_math.equation\",\"link\":\"/en/api/mp_math/equation.md\"},{\"text\":\"mbcp.mp_math.line\",\"link\":\"/en/api/mp_math/line.md\"},{\"text\":\"mbcp.mp_math.mp_math_typing\",\"link\":\"/en/api/mp_math/mp
|
2024-08-28 12:03:02 +08:00
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|