2024-08-29 13:25:00 +08:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="zh-Hant" dir="ltr">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
2024-08-31 06:08:36 +08:00
|
|
|
|
<title>mbcp.mp_math.angle | MBCP 文檔</title>
|
|
|
|
|
<meta name="description" content="MBCP 粒子計算和生成庫文檔">
|
2024-08-29 13:25:00 +08:00
|
|
|
|
<meta name="generator" content="VitePress v1.3.4">
|
2024-09-04 19:16:16 +08:00
|
|
|
|
<link rel="preload stylesheet" href="/assets/style.Bh0M9mVm.css" as="style">
|
2024-08-29 13:25:00 +08:00
|
|
|
|
|
2024-09-04 19:16:16 +08:00
|
|
|
|
<script type="module" src="/assets/app.B5pcS0RV.js"></script>
|
|
|
|
|
<link rel="modulepreload" href="/assets/chunks/theme.ClwrcgHO.js">
|
2024-08-31 07:55:26 +08:00
|
|
|
|
<link rel="modulepreload" href="/assets/chunks/framework.DpC1ZpOZ.js">
|
2024-09-03 22:49:39 +08:00
|
|
|
|
<link rel="modulepreload" href="/assets/zht_api_mp_math_angle.md.D6i--7zd.lean.js">
|
2024-08-31 06:08:36 +08:00
|
|
|
|
<link rel="icon" type="image/svg+xml" href="/mbcp-logo.svg">
|
2024-08-31 07:31:49 +08:00
|
|
|
|
<link rel="stylesheet" href="https://fonts.font.im/css?family=Cousine:400,400i,700,700i|Poppins:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i">
|
2024-08-29 13:25:00 +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-09-03 22:49:39 +08:00
|
|
|
|
<div id="app"><div class="Layout" data-v-3b4648ff><!--[--><!--]--><!--[--><span tabindex="-1" data-v-e813112c></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-e813112c> Skip to content </a><!--]--><!----><header class="VPNav" data-v-3b4648ff data-v-e823d444><div class="VPNavBar has-sidebar top" data-v-e823d444 data-v-da0688be><div class="wrapper" data-v-da0688be><div class="container" data-v-da0688be><div class="title" data-v-da0688be><div class="VPNavBarTitle has-sidebar" data-v-da0688be data-v-606a7e0f><a class="title" href="/zht/" data-v-606a7e0f><!--[--><!--]--><!--[--><img class="VPImage logo" src="/mbcp-logo.svg" alt data-v-cc63e071><!--]--><span data-v-606a7e0f>MBCP 文檔</span><!--[--><!--]--></a></div></div><div class="content" data-v-da0688be><div class="content-body" data-v-da0688be><!--[--><!--]--><div class="VPNavBarSearch search" data-v-da0688be><!--[--><!----><div id="local-search"><button type="button" class="DocSearch DocSearch-Button" aria-label="打開搜索框"><span class="DocSearch-Button-Container"><span class="vp-icon DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">搜索文檔</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-da0688be data-v-bf53b681><span id="main-nav-aria-label" class="visually-hidden" data-v-bf53b681> Main Navigation </span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/zht/guide/" tabindex="0" data-v-bf53b681 data-v-9a0da802><!--[--><span data-v-9a0da802>指引</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/zht/refer.html" tabindex="0" data-v-bf53b681 data-v-9a0da802><!--[--><span data-v-9a0da802>參考</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/zht/api/" tabindex="0" data-v-bf53b681 data-v-9a0da802><!--[--><span data-v-9a0da802>API引用</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/zht/demo/" tabindex="0" data-v-bf53b681 data-v-9a0da802><!--[--><span data-v-9a0da802>示範</span><!--]--></a><!--]--><!--]--></nav><div class="VPFlyout VPNavBarTranslations translations" data-v-da0688be data-v-912817b1 data-v-00660109><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="Change language" data-v-00660109><span class="text" data-v-00660109><span class="vpi-languages option-icon" data-v-00660109></span><!----><span class="vpi-chevron-down text-icon" data-v-00660109></span></span></button><div class="menu" data-v-00660109><div class="VPMenu" data-v-00660109 data-v-809b8af7><!----><!--[--><!--[--><div class="items" data-v-912817b1><p class="title" data-v-912817b1>繁體中文</p><!--[--><div class="VPMenuLink" data-v-912817b1 data-v-25a54821><a class="VPLink link" href="/api/mp_math/angle.html" data-v-25a54821><!--[-->简体中文<!--]--></a></div><div class="VPMenuLink" data-v-912817b1 data-v-25a54821><a class="VPLink link" href="/en/api/mp_math/angle.html" data-v-25a54821><!--[-->English<!--]--></a></div><div class="VPMenuLink" data-v-912817b1 data-v-25a54821><a class="VPLink link" href="/ja/api/mp_math/angle.html" data-v-25a54821><!--[-->日本語<!--]--></a></div><!--]--></div><!--]--><!--]--></div></div></div><div class="VPNavBarAppearance appearance" data-v-da0688be data-v-864d2abc><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="Switch to dark theme" aria-checked="false" data-v-864d2abc data-v-3125216b data-v-846fe538><span class="check" data-v-846fe538><span class="icon" data-v-846fe538><!--[--><span class="vpi-sun sun" data-v-3125216b></span><span class="vpi-moon moon" data-v-3125216b></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-da0688be data-v-2c606308 data-v-100434c4><!--[--><a class="VPSocialLink no-icon" href="https://github.com/snowykami/mbcp" aria-label="github" target="_blank
|
2024-08-29 13:25:00 +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-09-03 22:49:39 +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><p><a href="https://docs.python.org/3/library/functions.html#property" target="_blank" rel="noreferrer"><code>@property</code></a></p><h4 id="method-complementary-self-anyangle" tabindex="-1"><em><strong>method</strong></em> <code>complementary(self) -> AnyAngle</code> <a class="header-anchor" href="#method-complementary-self-anyangle" aria-label="Permalink to "***method*** `complementary(self) -> AnyAngle`""></a></h4><p><strong>説明</strong>: 余角:两角的和为90°。</p><p><strong>返回</strong>: 余角</p><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L30" target="_blank">於GitHub上查看</a></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-29 13:25:00 +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-09-03 22:49:39 +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><p><a href="https://docs.python.org/3/library/functions.html#property" target="_blank" rel="noreferrer"><code>@property</code></a></p><h4 id="method-supplementary-self-anyangle" tabindex="-1"><em><strong>method</strong></em> <code>supplementary(self) -> AnyAngle</code> <a class="header-anchor" href="#method-supplementary-self-anyangle" aria-label="Permalink to "***method*** `supplementary(self) -> AnyAngle`""></a></h4><p><strong>説明</strong>: 补角:两角的和为180°。</p><p><strong>返回</strong>: 补角</p><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L39" target="_blank">於GitHub上查看</a></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-29 13:25:00 +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-09-03 22:49:39 +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><p><a href="https://docs.python.org/3/library/functions.html#property" target="_blank" rel="noreferrer"><code>@property</code></a></p><h4 id="method-degree-self-float" tabindex="-1"><em><strong>method</strong></em> <code>degree(self) -> float</code> <a class="header-anchor" href="#method-degree-self-float" aria-label="Permalink to "***method*** `degree(self) -> float`""></a></h4><p><strong>説明</strong>: 角度。</p><p><strong>返回</strong>: 弧度</p><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L48" target="_blank">於GitHub上查看</a></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-29 13:25:00 +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-09-03 22:49:39 +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><p><a href="https://docs.python.org/3/library/functions.html#property" target="_blank" rel="noreferrer"><code>@property</code></a></p><h4 id="method-minimum-positive-self-anyangle" tabindex="-1"><em><strong>method</strong></em> <code>minimum_positive(self) -> AnyAngle</code> <a class="header-anchor" href="#method-minimum-positive-self-anyangle" aria-label="Permalink to "***method*** `minimum_positive(self) -> AnyAngle`""></a></h4><p><strong>説明</strong>: 最小正角。</p><p><strong>返回</strong>: 最小正角度</p><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L57" target="_blank">於GitHub上查看</a></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-29 13:25:00 +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-09-03 22:49:39 +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><p><a href="https://docs.python.org/3/library/functions.html#property" target="_blank" rel="noreferrer"><code>@property</code></a></p><h4 id="method-maximum-negative-self-anyangle" tabindex="-1"><em><strong>method</strong></em> <code>maximum_negative(self) -> AnyAngle</code> <a class="header-anchor" href="#method-maximum-negative-self-anyangle" aria-label="Permalink to "***method*** `maximum_negative(self) -> AnyAngle`""></a></h4><p><strong>説明</strong>: 最大负角。</p><p><strong>返回</strong>: 最大负角度</p><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L66" target="_blank">於GitHub上查看</a></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-29 13:25:00 +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-09-03 22:49:39 +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><p><a href="https://docs.python.org/3/library/functions.html#property" target="_blank" rel="noreferrer"><code>@property</code></a></p><h4 id="method-sin-self-float" tabindex="-1"><em><strong>method</strong></em> <code>sin(self) -> float</code> <a class="header-anchor" href="#method-sin-self-float" aria-label="Permalink to "***method*** `sin(self) -> float`""></a></h4><p><strong>説明</strong>: 正弦值。</p><p><strong>返回</strong>: 正弦值</p><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L75" target="_blank">於GitHub上查看</a></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-29 13:25:00 +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-09-03 22:49:39 +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><p><a href="https://docs.python.org/3/library/functions.html#property" target="_blank" rel="noreferrer"><code>@property</code></a></p><h4 id="method-cos-self-float" tabindex="-1"><em><strong>method</strong></em> <code>cos(self) -> float</code> <a class="header-anchor" href="#method-cos-self-float" aria-label="Permalink to "***method*** `cos(self) -> float`""></a></h4><p><strong>説明</strong>: 余弦值。</p><p><strong>返回</strong>: 余弦值</p><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L84" target="_blank">於GitHub上查看</a></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-29 13:25:00 +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-09-03 22:49:39 +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><p><a href="https://docs.python.org/3/library/functions.html#property" target="_blank" rel="noreferrer"><code>@property</code></a></p><h4 id="method-tan-self-float" tabindex="-1"><em><strong>method</strong></em> <code>tan(self) -> float</code> <a class="header-anchor" href="#method-tan-self-float" aria-label="Permalink to "***method*** `tan(self) -> float`""></a></h4><p><strong>説明</strong>: 正切值。</p><p><strong>返回</strong>: 正切值</p><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L93" target="_blank">於GitHub上查看</a></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-29 13:25:00 +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-09-03 22:49:39 +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><p><a href="https://docs.python.org/3/library/functions.html#property" target="_blank" rel="noreferrer"><code>@property</code></a></p><h4 id="method-cot-self-float" tabindex="-1"><em><strong>method</strong></em> <code>cot(self) -> float</code> <a class="header-anchor" href="#method-cot-self-float" aria-label="Permalink to "***method*** `cot(self) -> float`""></a></h4><p><strong>説明</strong>: 余切值。</p><p><strong>返回</strong>: 余切值</p><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L102" target="_blank">於GitHub上查看</a></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-29 13:25:00 +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-09-03 22:49:39 +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><p><a href="https://docs.python.org/3/library/functions.html#property" target="_blank" rel="noreferrer"><code>@property</code></a></p><h4 id="method-sec-self-float" tabindex="-1"><em><strong>method</strong></em> <code>sec(self) -> float</code> <a class="header-anchor" href="#method-sec-self-float" aria-label="Permalink to "***method*** `sec(self) -> float`""></a></h4><p><strong>説明</strong>: 正割值。</p><p><strong>返回</strong>: 正割值</p><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L111" target="_blank">於GitHub上查看</a></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-29 13:25:00 +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-09-03 22:49:39 +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><p><a href="https://docs.python.org/3/library/functions.html#property" target="_blank" rel="noreferrer"><code>@property</code></a></p><h4 id="method-csc-self-float" tabindex="-1"><em><strong>method</strong></em> <code>csc(self) -> float</code> <a class="header-anchor" href="#method-csc-self-float" aria-label="Permalink to "***method*** `csc(self) -> float`""></a></h4><p><strong>説明</strong>: 余割值。</p><p><strong>返回</strong>: 余割值</p><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L120" target="_blank">於GitHub上查看</a></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-29 13:25:00 +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-09-03 22:49:39 +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><h4 id="method-self-other-anyangle-anyangle" tabindex="-1"><em><strong>method</strong></em> <code>self + other: AnyAngle => AnyAngle</code> <a class="header-anchor" href="#method-self-other-anyangle-anyangle" aria-label="Permalink to "***method*** `self + other: AnyAngle => AnyAngle`""></a></h4><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L128" target="_blank">於GitHub上查看</a></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><h4 id="method-eq-self-other" tabindex="-1"><em><strong>method</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#method-eq-self-other" aria-label="Permalink to "***method*** `__eq__(self, other)`""></a></h4><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L131" target="_blank">於GitHub上查看</a></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><h4 id="method-self-other-anyangle-anyangle-1" tabindex="-1"><em><strong>method</strong></em> <code>self - other: AnyAngle => AnyAngle</code> <a class="header-anchor" href="#method-self-other-anyangle-anyangle-1" aria-label="Permalink to "***method*** `self - other: AnyAngle => AnyAngle`""></a></h4><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L134" target="_blank">於GitHub上查看</a></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><h4 id="method-self-other-float-anyangle" tabindex="-1"><em><strong>method</strong></em> <code>self * other: float => AnyAngle</code> <a class="header-anchor" href="#method-self-other-float-anyangle" aria-label="Permalink to "***method*** `self * other: float => AnyAngle`""></a></h4><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L137" target="_blank">於GitHub上查看</a></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><p><code>@overload</code></p><h4 id="method-self-other-float-anyangle-1" tabindex="-1"><em><strong>method</strong></em> <code>self / other: float => AnyAngle</code> <a class="header-anchor" href="#method-self-other-float-anyangle-1" aria-label="Permalink to "***method*** `self / other: float => AnyAngle`""></a></h4><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L147" target="_blank">於GitHub上查看</a></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-29 13:25:00 +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-09-03 22:49:39 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="method-self-other-anyangle-float" tabindex="-1"><em><strong>method</strong></em> <code>self / other: AnyAngle => float</code> <a class="header-anchor" href="#method-self-other-anyangle-float" aria-label="Permalink to "***method*** `self / other: AnyAngle => float`""></a></h4><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L151" target="_blank">於GitHub上查看</a></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-29 13:25:00 +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-09-03 22:49:39 +08:00
|
|
|
|
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="method-self-other" tabindex="-1"><em><strong>method</strong></em> <code>self / other</code> <a class="header-anchor" href="#method-self-other" aria-label="Permalink to "***method*** `self / other`""></a></h4><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L154" target="_blank">於GitHub上查看</a></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-29 13:25:00 +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>
|
2024-09-03 22:49:39 +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;"> 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-01c90815 data-v-28deee4a><!--[--><!--]--><div class="edit-info" data-v-28deee4a><div class="edit-link" data-v-28deee4a><a class="VPLink link vp-external-link-icon no-icon edit-link-button" href="https://github.com/snowykami/mbcp/tree/main/mbcp//mp_math/angle.py" target="_blank" rel="noreferrer" data-v-28deee4a><!--[--><span class="vpi-square-pen edit-link-icon" data-v-28deee4a></span> 於 GitHub 上編輯這頁<!--]--></a></div><!----></div><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-28deee4a><span class="visually-hidden" id="doc-footer-aria-label" data-v-28deee4a>Pager</span><div class="pager" data-v-28deee4a><!----></div><div class="pager" data-v-28deee4a><a class="VPLink link pager-link next" href="/zht/api/mp_math/const.html" data-v-28deee4a><!--[--><span class="desc" data-v-28deee4a>下一頁</span><span class="title" data-v-28deee4a>mbcp.mp_math.const</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-3b4648ff data-v-d69bcf5d><div class="container" data-v-d69bcf5d><p class="message" data-v-d69bcf5d>文檔由 <a href="https://vitepress.dev/">VitePress</a> 構建 | API引用由 <a href="https://github.com/LiteyukiStudio/litedoc">litedoc</a> 生成</p><p class="copyright" data-v-d69bcf5d>Copyright (C) 2020-2024 SnowyKami. All Rights Reserved</p></div></footer><!--[--><!--]--></div></div>
|
|
|
|
|
<script>window.__VP_HASH_MAP__=JSON.parse("{\"api_index.md\":\"YS-zqWwM\",\"api_mp_math_angle.md\":\"CThQB5nq\",\"api_mp_math_const.md\":\"DqjQQ6Ym\",\"api_mp_math_equation.md\":\"C1YMGsIR\",\"api_mp_math_function.md\":\"C0P_-kol\",\"api_mp_math_index.md\":\"yEj9pzOD\",\"api_mp_math_line.md\":\"Okmn0BTW\",\"api_mp_math_mp_math_typing.md\":\"bdiOSvFy\",\"api_mp_math_plane.md\":\"Dl-FdXx3\",\"api_mp_math_point.md\":\"xU6HjeL2\",\"api_mp_math_segment.md\":\"BqloNjdD\",\"api_mp_math_utils.md\":\"CGBZjr3t\",\"api_mp_math_vector.md\":\"B443ftAV\",\"api_particle_index.md\":\"VxgsHiZa\",\"api_presets_index.md\":\"BEZBx6Gj\",\"api_presets_model_index.md\":\"CzrZX1Li\",\"demo_best-practice.md\":\"CmYjfrxd\",\"demo_index.md\":\"CVAdlaFI\",\"en_api_index.md\":\"BrJlad-k\",\"en_api_mp_math_angle.md\":\"BvzeTdtj\",\"en_api_mp_math_const.md\":\"CrUt_3FV\",\"en_api_mp_math_equation.md\":\"CHBtH4v6\",\"en_api_mp_math_function.md\":\"D68bTyed\",\"en_api_mp_math_index.md\":\"D331As7i\",\"en_api_mp_math_line.md\":\"B69kHoPc\",\"en_api_mp_math_mp_math_typing.md\":\"xRGJGUMm\",\"en_api_mp_math_plane.md\":\"BdKgRumw\",\"en_api_mp_math_point.md\":\"BeT2oqIN\",\"en_api_mp_math_segment.md\":\"DbFvInHk\",\"en_api_mp_math_utils.md\":\"CYq8hncD\",\"en_api_mp_math_vector.md\":\"CPGkZzwr\",\"en_api_particle_index.md\":\"ZKByd_x0\",\"en_api_presets_index.md\":\"BhoZyGSV\",\"en_api_presets_model_index.md\":\"BM4zzWd9\",\"en_demo_best-practice.md\":\"CmtY105n\",\"en_guide_index.md\":\"C3kI8f8A\",\"en_index.md\":\"Cc-Nt9Ot\",\"en_refer_index.md\":\"Cq6GWi0V\",\"guide_index.md\":\"CJOqvlSE\",\"index.md\":\"WVpbC1C1\",\"ja_api_index.md\":\"6u5f7W7q\",\"ja_api_mp_math_angle.md\":\"CbTFNFpP\",\"ja_api_mp_math_const.md\":\"HrVLdLVW\",\"ja_api_mp_math_equation.md\":\"BR_cjYxP\",\"ja_api_mp_math_function.md\":\"CeNPnpri\",\"ja_api_mp_math_index.md\":\"BVYYBcgX\",\"ja_api_mp_math_line.md\":\"CmVmq6PC\",\"ja_api_mp_math_mp_math_typing.md\":\"BnSHEEFC\",\"ja_api_mp_math_plane.md\":\"D7v3q_U8\",\"ja_api_mp_math_point.md\":\"BqC8JgjG\",\"ja_api_mp_math_segment.md\":\"vi1FH0--\",\"ja_api_mp_math_utils.md\":\"DhPmcvK-\",\"ja_api_mp_math_vector.md\":\"B7oDy-SU\",\"ja_api_particle_index.md\":\"ighey3JD\",\"ja_api_presets_index.md\":\"Bow22HNO\",\"ja_api_presets_model_index.md\":\"C-uCqjXi\",\"ja_demo_best-practice.md\":\"CBHiF6ec\",\"ja_guide_index.md\":\"w1Tf2Adm\",\"ja_index.md\":\"BvjV8RIJ\",\"ja_refer_index.md\":\"DamUscs8\",\"refer_function_curry.md\":\"D_oqRDd3\",\"refer_function_function.md\":\"Bi_82lIJ\",\"refer_index.md\":\"yFZW0kI4\",\"zht_api_index.md\":\"DMjE1xBr\",\"zht_api_mp_math_angle.md\":\"D6i--7zd\",\"zht_api_mp_math_const.md\":\"DI0xAyWX\",\"zht_api_mp_math_equation.md\":\"B3rt0Pgw\",\"zht_api_mp_math_function.md\":\"Cf9utaTV\",\"zht_api_mp_math_index.md\":\"DbgI3vD1\",\"zht_api_mp_math_line.md\":\"-wtKMTMJ\",\"zht_api_mp_math_mp_math_typing.md\":\"BbOeRs-n\",\"zht_api_mp_math_plane.md\":\"o_Vroqha\",\"zht_api_mp_math_point.md\":\"CNwxPYyR\",\"zht_api_mp_math_segment.md\":\"Dr21f14B\",\"zht_api_mp_math_utils.md\":\"B57z4IwN\",\"zht_api_mp_math_vector.md\":\"DCG5CraB\",\"zht_api_particle_index.md\":\"DjZABivI\",\"zht_api_presets_index.md\":\"Bl7tnVS9\",\"zht_api_presets_model_index.md\":\"BQanubQ0\",\"zht_demo_best-practice.md\":\"CPNbD_Lg\",\"zht_guide_index.md\":\"BNnMViC8\",\"zht_index.md\":\"fkOYkZZe\",\"zht_refer_index.md\":\"B7CQS2UW\"}");function deserializeFunctions(r){return Array.isArray(r)?r.map(deserializeFunctions):typeof r=="object"&&r!==null?Object.keys(r).reduce((t,n)=>(t[n]=deserializeFunctions(r[n]),t),{}):typeof r=="string"&&r.startsWith("_vp-fn_")?new Function(`return ${r.slice(7)}`)():r};window.__VP_SITE_DATA__=deserializeFunctions(JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"VitePress\",\"description\":\"A VitePress site\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"/mbcp-logo.svg\",\"sidebar\":{\"/api/\":{\"base\":\"/api/\",\"items\":[{\"text\":\"MBCP\",\"items\":[{\"text\":\"mp_math\",\"items\":[{\"text\":\"mbcp.mp_math.angle\",\"link\":\"mp_m
|
2024-08-29 13:25:00 +08:00
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|