Deploying to docs from @ snowykami/mbcp@71a7a40ffa 🚀

This commit is contained in:
远野千束 2024-08-31 16:02:40 +00:00
parent 608b1d48df
commit 882cf50c7d
211 changed files with 1524 additions and 1524 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
import{_ as s,c as a,o as i,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/angle.md","filePath":"zh/api/mp_math/angle.md"}'),t={name:"api/mp_math/angle.md"},e=n(`<h1 id="mbcp-mp-math-angle" tabindex="-1">mbcp.mp_math.angle <a class="header-anchor" href="#mbcp-mp-math-angle" aria-label="Permalink to &quot;mbcp.mp_math.angle&quot;"></a></h1><p><strong>说明</strong>: 本模块定义了角度相关的类</p><h3 id="class-angle" tabindex="-1"><em><strong>class</strong></em> <code>Angle</code> <a class="header-anchor" href="#class-angle" aria-label="Permalink to &quot;***class*** \`Angle\`&quot;"></a></h3><h3 id="class-anyangle-angle" tabindex="-1"><em><strong>class</strong></em> <code>AnyAngle(Angle)</code> <a class="header-anchor" href="#class-anyangle-angle" aria-label="Permalink to &quot;***class*** \`AnyAngle(Angle)\`&quot;"></a></h3><h4 id="def-init-self-value-float-is-radian-bool-false" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, value: float, is_radian: bool = False)</code> <a class="header-anchor" href="#def-init-self-value-float-is-radian-bool-false" aria-label="Permalink to &quot;***def*** \`__init__(self, value: float, is_radian: bool = False)\`&quot;"></a></h4><p><strong>说明</strong>: 任意角度。</p><p><strong>参数</strong>:</p><blockquote><ul><li>value: 角度或弧度值</li><li>is_radian: 是否为弧度,默认为否</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L17" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, value: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, is_radian: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">False</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
import{_ as s,c as a,o as i,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/angle.md","filePath":"zh/api/mp_math/angle.md"}'),t={name:"api/mp_math/angle.md"},e=n(`<h1 id="mbcp-mp-math-angle" tabindex="-1">mbcp.mp_math.angle <a class="header-anchor" href="#mbcp-mp-math-angle" aria-label="Permalink to &quot;mbcp.mp_math.angle&quot;"></a></h1><p><strong>说明</strong>: 本模块定义了角度相关的类</p><h3 id="class-angle" tabindex="-1"><em><strong>class</strong></em> <code>Angle</code> <a class="header-anchor" href="#class-angle" aria-label="Permalink to &quot;***class*** \`Angle\`&quot;"></a></h3><h3 id="class-anyangle-angle" tabindex="-1"><em><strong>class</strong></em> <code>AnyAngle(Angle)</code> <a class="header-anchor" href="#class-anyangle-angle" aria-label="Permalink to &quot;***class*** \`AnyAngle(Angle)\`&quot;"></a></h3><h4 id="func-init-self-value-float-is-radian-bool-false" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, value: float, is_radian: bool = False)</code> <a class="header-anchor" href="#func-init-self-value-float-is-radian-bool-false" aria-label="Permalink to &quot;***func*** \`__init__(self, value: float, is_radian: bool = False)\`&quot;"></a></h4><p><strong>说明</strong>: 任意角度。</p><p><strong>参数</strong>:</p><blockquote><ul><li>value: 角度或弧度值</li><li>is_radian: 是否为弧度,默认为否</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L17" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, value: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, is_radian: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">False</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -8,92 +8,92 @@ import{_ as s,c as a,o as i,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c
<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>
<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="def-complementary-self-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>complementary(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#def-complementary-self-anyangle" aria-label="Permalink to &quot;***def*** \`complementary(self) -&gt; AnyAngle\`&quot;"></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>
<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="func-complementary-self-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>complementary(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#func-complementary-self-anyangle" aria-label="Permalink to &quot;***func*** \`complementary(self) -&gt; AnyAngle\`&quot;"></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>
<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) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</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;">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="def-supplementary-self-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>supplementary(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#def-supplementary-self-anyangle" aria-label="Permalink to &quot;***def*** \`supplementary(self) -&gt; AnyAngle\`&quot;"></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>
<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="func-supplementary-self-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>supplementary(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#func-supplementary-self-anyangle" aria-label="Permalink to &quot;***func*** \`supplementary(self) -&gt; AnyAngle\`&quot;"></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>
<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) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</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;">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="def-degree-self-float" tabindex="-1"><em><strong>def</strong></em> <code>degree(self) -&gt; float</code> <a class="header-anchor" href="#def-degree-self-float" aria-label="Permalink to &quot;***def*** \`degree(self) -&gt; float\`&quot;"></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>
<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="func-degree-self-float" tabindex="-1"><em><strong>func</strong></em> <code>degree(self) -&gt; float</code> <a class="header-anchor" href="#func-degree-self-float" aria-label="Permalink to &quot;***func*** \`degree(self) -&gt; float\`&quot;"></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>
<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) -&gt; </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;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</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:#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="def-minimum-positive-self-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>minimum_positive(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#def-minimum-positive-self-anyangle" aria-label="Permalink to &quot;***def*** \`minimum_positive(self) -&gt; AnyAngle\`&quot;"></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>
<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="func-minimum-positive-self-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>minimum_positive(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#func-minimum-positive-self-anyangle" aria-label="Permalink to &quot;***func*** \`minimum_positive(self) -&gt; AnyAngle\`&quot;"></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>
<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) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</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;"> (</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="def-maximum-negative-self-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>maximum_negative(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#def-maximum-negative-self-anyangle" aria-label="Permalink to &quot;***def*** \`maximum_negative(self) -&gt; AnyAngle\`&quot;"></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>
<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="func-maximum-negative-self-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>maximum_negative(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#func-maximum-negative-self-anyangle" aria-label="Permalink to &quot;***func*** \`maximum_negative(self) -&gt; AnyAngle\`&quot;"></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>
<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) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</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:#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="def-sin-self-float" tabindex="-1"><em><strong>def</strong></em> <code>sin(self) -&gt; float</code> <a class="header-anchor" href="#def-sin-self-float" aria-label="Permalink to &quot;***def*** \`sin(self) -&gt; float\`&quot;"></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>
<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="func-sin-self-float" tabindex="-1"><em><strong>func</strong></em> <code>sin(self) -&gt; float</code> <a class="header-anchor" href="#func-sin-self-float" aria-label="Permalink to &quot;***func*** \`sin(self) -&gt; float\`&quot;"></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>
<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) -&gt; </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;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</span></span>
<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="def-cos-self-float" tabindex="-1"><em><strong>def</strong></em> <code>cos(self) -&gt; float</code> <a class="header-anchor" href="#def-cos-self-float" aria-label="Permalink to &quot;***def*** \`cos(self) -&gt; float\`&quot;"></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>
<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="func-cos-self-float" tabindex="-1"><em><strong>func</strong></em> <code>cos(self) -&gt; float</code> <a class="header-anchor" href="#func-cos-self-float" aria-label="Permalink to &quot;***func*** \`cos(self) -&gt; float\`&quot;"></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>
<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) -&gt; </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;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</span></span>
<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="def-tan-self-float" tabindex="-1"><em><strong>def</strong></em> <code>tan(self) -&gt; float</code> <a class="header-anchor" href="#def-tan-self-float" aria-label="Permalink to &quot;***def*** \`tan(self) -&gt; float\`&quot;"></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>
<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="func-tan-self-float" tabindex="-1"><em><strong>func</strong></em> <code>tan(self) -&gt; float</code> <a class="header-anchor" href="#func-tan-self-float" aria-label="Permalink to &quot;***func*** \`tan(self) -&gt; float\`&quot;"></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>
<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) -&gt; </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;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</span></span>
<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="def-cot-self-float" tabindex="-1"><em><strong>def</strong></em> <code>cot(self) -&gt; float</code> <a class="header-anchor" href="#def-cot-self-float" aria-label="Permalink to &quot;***def*** \`cot(self) -&gt; float\`&quot;"></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>
<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="func-cot-self-float" tabindex="-1"><em><strong>func</strong></em> <code>cot(self) -&gt; float</code> <a class="header-anchor" href="#func-cot-self-float" aria-label="Permalink to &quot;***func*** \`cot(self) -&gt; float\`&quot;"></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>
<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) -&gt; </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;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</span></span>
<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="def-sec-self-float" tabindex="-1"><em><strong>def</strong></em> <code>sec(self) -&gt; float</code> <a class="header-anchor" href="#def-sec-self-float" aria-label="Permalink to &quot;***def*** \`sec(self) -&gt; float\`&quot;"></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>
<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="func-sec-self-float" tabindex="-1"><em><strong>func</strong></em> <code>sec(self) -&gt; float</code> <a class="header-anchor" href="#func-sec-self-float" aria-label="Permalink to &quot;***func*** \`sec(self) -&gt; float\`&quot;"></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>
<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) -&gt; </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;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</span></span>
<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="def-csc-self-float" tabindex="-1"><em><strong>def</strong></em> <code>csc(self) -&gt; float</code> <a class="header-anchor" href="#def-csc-self-float" aria-label="Permalink to &quot;***def*** \`csc(self) -&gt; float\`&quot;"></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>
<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="func-csc-self-float" tabindex="-1"><em><strong>func</strong></em> <code>csc(self) -&gt; float</code> <a class="header-anchor" href="#func-csc-self-float" aria-label="Permalink to &quot;***func*** \`csc(self) -&gt; float\`&quot;"></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>
<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) -&gt; </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;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</span></span>
<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="def-self-other-anyangle-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>self + other: AnyAngle =&gt; AnyAngle</code> <a class="header-anchor" href="#def-self-other-anyangle-anyangle" aria-label="Permalink to &quot;***def*** \`self + other: AnyAngle =&gt; AnyAngle\`&quot;"></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;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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="def-eq-self-other" tabindex="-1"><em><strong>def</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#def-eq-self-other" aria-label="Permalink to &quot;***def*** \`__eq__(self, other)\`&quot;"></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="def-self-other-anyangle-anyangle-1" tabindex="-1"><em><strong>def</strong></em> <code>self - other: AnyAngle =&gt; AnyAngle</code> <a class="header-anchor" href="#def-self-other-anyangle-anyangle-1" aria-label="Permalink to &quot;***def*** \`self - other: AnyAngle =&gt; AnyAngle\`&quot;"></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;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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="def-self-other-float-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>self * other: float =&gt; AnyAngle</code> <a class="header-anchor" href="#def-self-other-float-anyangle" aria-label="Permalink to &quot;***def*** \`self * other: float =&gt; AnyAngle\`&quot;"></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;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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="def-self-other-float-anyangle-1" tabindex="-1"><em><strong>def</strong></em> <code>self / other: float =&gt; AnyAngle</code> <a class="header-anchor" href="#def-self-other-float-anyangle-1" aria-label="Permalink to &quot;***def*** \`self / other: float =&gt; AnyAngle\`&quot;"></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>
<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="func-self-other-anyangle-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>self + other: AnyAngle =&gt; AnyAngle</code> <a class="header-anchor" href="#func-self-other-anyangle-anyangle" aria-label="Permalink to &quot;***func*** \`self + other: AnyAngle =&gt; AnyAngle\`&quot;"></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;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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="func-eq-self-other" tabindex="-1"><em><strong>func</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#func-eq-self-other" aria-label="Permalink to &quot;***func*** \`__eq__(self, other)\`&quot;"></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="func-self-other-anyangle-anyangle-1" tabindex="-1"><em><strong>func</strong></em> <code>self - other: AnyAngle =&gt; AnyAngle</code> <a class="header-anchor" href="#func-self-other-anyangle-anyangle-1" aria-label="Permalink to &quot;***func*** \`self - other: AnyAngle =&gt; AnyAngle\`&quot;"></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;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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="func-self-other-float-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>self * other: float =&gt; AnyAngle</code> <a class="header-anchor" href="#func-self-other-float-anyangle" aria-label="Permalink to &quot;***func*** \`self * other: float =&gt; AnyAngle\`&quot;"></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;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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="func-self-other-float-anyangle-1" tabindex="-1"><em><strong>func</strong></em> <code>self / other: float =&gt; AnyAngle</code> <a class="header-anchor" href="#func-self-other-float-anyangle-1" aria-label="Permalink to &quot;***func*** \`self / other: float =&gt; AnyAngle\`&quot;"></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>
<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;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-anyangle-float" tabindex="-1"><em><strong>def</strong></em> <code>self / other: AnyAngle =&gt; float</code> <a class="header-anchor" href="#def-self-other-anyangle-float" aria-label="Permalink to &quot;***def*** \`self / other: AnyAngle =&gt; float\`&quot;"></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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-anyangle-float" tabindex="-1"><em><strong>func</strong></em> <code>self / other: AnyAngle =&gt; float</code> <a class="header-anchor" href="#func-self-other-anyangle-float" aria-label="Permalink to &quot;***func*** \`self / other: AnyAngle =&gt; float\`&quot;"></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>
<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;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </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:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="def-self-other" tabindex="-1"><em><strong>def</strong></em> <code>self / other</code> <a class="header-anchor" href="#def-self-other" aria-label="Permalink to &quot;***def*** \`self / other\`&quot;"></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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="func-self-other" tabindex="-1"><em><strong>func</strong></em> <code>self / other</code> <a class="header-anchor" href="#func-self-other" aria-label="Permalink to &quot;***func*** \`self / other\`&quot;"></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>
<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>`,80),l=[e];function h(p,k,r,d,o,g){return i(),a("div",null,l)}const F=s(t,[["render",h]]);export{c as __pageData,F as default};
<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>`,80),l=[e];function h(p,k,r,o,d,g){return i(),a("div",null,l)}const F=s(t,[["render",h]]);export{c as __pageData,F as default};

View File

@ -1 +1 @@
import{_ as s,c as a,o as i,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/angle.md","filePath":"zh/api/mp_math/angle.md"}'),t={name:"api/mp_math/angle.md"},e=n("",80),l=[e];function h(p,k,r,d,o,g){return i(),a("div",null,l)}const F=s(t,[["render",h]]);export{c as __pageData,F as default};
import{_ as s,c as a,o as i,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/angle.md","filePath":"zh/api/mp_math/angle.md"}'),t={name:"api/mp_math/angle.md"},e=n("",80),l=[e];function h(p,k,r,o,d,g){return i(),a("div",null,l)}const F=s(t,[["render",h]]);export{c as __pageData,F as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/equation.md","filePath":"zh/api/mp_math/equation.md"}'),t={name:"api/mp_math/equation.md"},l=n(`<h1 id="mbcp-mp-math-equation" tabindex="-1">mbcp.mp_math.equation <a class="header-anchor" href="#mbcp-mp-math-equation" aria-label="Permalink to &quot;mbcp.mp_math.equation&quot;"></a></h1><p><strong>说明</strong>: 本模块定义了方程相关的类和函数以及一些常用的数学函数</p><h3 id="class-curveequation" tabindex="-1"><em><strong>class</strong></em> <code>CurveEquation</code> <a class="header-anchor" href="#class-curveequation" aria-label="Permalink to &quot;***class*** \`CurveEquation\`&quot;"></a></h3><h4 id="def-init-self-x-func-onevarfunc-y-func-onevarfunc-z-func-onevarfunc" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)</code> <a class="header-anchor" href="#def-init-self-x-func-onevarfunc-y-func-onevarfunc-z-func-onevarfunc" aria-label="Permalink to &quot;***def*** \`__init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)\`&quot;"></a></h4><p><strong>说明</strong>: 曲线方程。</p><p><strong>参数</strong>:</p><blockquote><ul><li>x_func (<a href="./mp_math_typing.html#var-onevarfunc"><code>OneVarFunc</code></a>): x函数</li><li>y_func (<a href="./mp_math_typing.html#var-onevarfunc"><code>OneVarFunc</code></a>): y函数</li><li>z_func (<a href="./mp_math_typing.html#var-onevarfunc"><code>OneVarFunc</code></a>): z函数</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/equation.py#L12" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):</span></span>
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/equation.md","filePath":"zh/api/mp_math/equation.md"}'),t={name:"api/mp_math/equation.md"},l=n(`<h1 id="mbcp-mp-math-equation" tabindex="-1">mbcp.mp_math.equation <a class="header-anchor" href="#mbcp-mp-math-equation" aria-label="Permalink to &quot;mbcp.mp_math.equation&quot;"></a></h1><p><strong>说明</strong>: 本模块定义了方程相关的类和函数以及一些常用的数学函数</p><h3 id="class-curveequation" tabindex="-1"><em><strong>class</strong></em> <code>CurveEquation</code> <a class="header-anchor" href="#class-curveequation" aria-label="Permalink to &quot;***class*** \`CurveEquation\`&quot;"></a></h3><h4 id="func-init-self-x-func-onevarfunc-y-func-onevarfunc-z-func-onevarfunc" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)</code> <a class="header-anchor" href="#func-init-self-x-func-onevarfunc-y-func-onevarfunc-z-func-onevarfunc" aria-label="Permalink to &quot;***func*** \`__init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)\`&quot;"></a></h4><p><strong>说明</strong>: 曲线方程。</p><p><strong>参数</strong>:</p><blockquote><ul><li>x_func (<a href="./mp_math_typing.html#var-onevarfunc"><code>OneVarFunc</code></a>): x函数</li><li>y_func (<a href="./mp_math_typing.html#var-onevarfunc"><code>OneVarFunc</code></a>): y函数</li><li>z_func (<a href="./mp_math_typing.html#var-onevarfunc"><code>OneVarFunc</code></a>): z函数</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/equation.py#L12" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -8,7 +8,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const u
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x_func </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x_func</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y_func </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> y_func</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z_func </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> z_func</span></span></code></pre></div></details><h4 id="def-call-self-t-var-point3-tuple-point3" tabindex="-1"><em><strong>def</strong></em> <code>__call__(self, *t: Var) -&gt; Point3 | tuple[Point3, ...]</code> <a class="header-anchor" href="#def-call-self-t-var-point3-tuple-point3" aria-label="Permalink to &quot;***def*** \`__call__(self, *t: Var) -&gt; Point3 | tuple[Point3, ...]\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>*t:</li><li>:</li></ul></blockquote><p><strong></strong>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/equation.py#L24" 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;"> __call__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t: Var) -&gt; Point3 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tuple[Point3, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z_func </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> z_func</span></span></code></pre></div></details><h4 id="func-call-self-t-var-point3-tuple-point3" tabindex="-1"><em><strong>func</strong></em> <code>__call__(self, *t: Var) -&gt; Point3 | tuple[Point3, ...]</code> <a class="header-anchor" href="#func-call-self-t-var-point3-tuple-point3" aria-label="Permalink to &quot;***func*** \`__call__(self, *t: Var) -&gt; Point3 | tuple[Point3, ...]\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>*t:</li><li>:</li></ul></blockquote><p><strong></strong>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/equation.py#L24" 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;"> __call__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t: Var) -&gt; Point3 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tuple[Point3, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -20,7 +20,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const u
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> len</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(t) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1</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;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x_func(t[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]), </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y_func(t[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]), </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z_func(t[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]))</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> tuple</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([Point3(x, y, z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">for</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x, y, z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">in</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> zip</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x_func(t), </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y_func(t), </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z_func(t))])</span></span></code></pre></div></details><h3 id="def-get-partial-derivative-func-func-multivarsfunc-var-int-tuple-int-epsilon-number-epsilon-multivarsfunc" tabindex="-1"><em><strong>def</strong></em> <code>get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -&gt; MultiVarsFunc</code> <a class="header-anchor" href="#def-get-partial-derivative-func-func-multivarsfunc-var-int-tuple-int-epsilon-number-epsilon-multivarsfunc" aria-label="Permalink to &quot;***def*** \`get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -&gt; MultiVarsFunc\`&quot;"></a></h3><p><strong></strong>: N</p><div class="warning custom-block github-alert"><p class="custom-block-title">WARNING</p><p></p></div><p><strong></strong>:</p><blockquote><ul><li>func (<a href="./mp_math_typing.html#var-multivarsfunc"><code>MultiVarsFunc</code></a>): N</li><li>var: ()()</li><li>epsilon: </li></ul></blockquote><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>ValueError </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/equation.py#L42" 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:#6F42C1;--shiki-dark:#B392F0;"> get_partial_derivative_func</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(func: MultiVarsFunc, var: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">int</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tuple[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">int</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">], epsilon: Number</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">EPSILON</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; MultiVarsFunc:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> tuple</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([Point3(x, y, z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">for</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x, y, z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">in</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> zip</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x_func(t), </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y_func(t), </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z_func(t))])</span></span></code></pre></div></details><h3 id="func-get-partial-derivative-func-func-multivarsfunc-var-int-tuple-int-epsilon-number-epsilon-multivarsfunc" tabindex="-1"><em><strong>func</strong></em> <code>get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -&gt; MultiVarsFunc</code> <a class="header-anchor" href="#func-get-partial-derivative-func-func-multivarsfunc-var-int-tuple-int-epsilon-number-epsilon-multivarsfunc" aria-label="Permalink to &quot;***func*** \`get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -&gt; MultiVarsFunc\`&quot;"></a></h3><p><strong></strong>: N</p><div class="warning custom-block github-alert"><p class="custom-block-title">WARNING</p><p></p></div><p><strong></strong>:</p><blockquote><ul><li>func (<a href="./mp_math_typing.html#var-multivarsfunc"><code>MultiVarsFunc</code></a>): N</li><li>var: ()()</li><li>epsilon: </li></ul></blockquote><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>ValueError </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/equation.py#L42" 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:#6F42C1;--shiki-dark:#B392F0;"> get_partial_derivative_func</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(func: MultiVarsFunc, var: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">int</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tuple[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">int</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">], epsilon: Number</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">EPSILON</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; MultiVarsFunc:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 求N元函数一阶偏导函数这玩意不太稳定慎用</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &gt; [!warning]</span></span>
@ -62,4 +62,4 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const u
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> result_func(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">args)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> high_order_partial_derivative_func</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ValueError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Invalid var type&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details>`,23),p=[l];function h(e,k,r,E,d,g){return a(),i("div",null,p)}const F=s(t,[["render",h]]);export{u as __pageData,F as default};
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ValueError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Invalid var type&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details>`,23),p=[l];function h(k,e,r,E,c,d){return a(),i("div",null,p)}const F=s(t,[["render",h]]);export{u as __pageData,F as default};

View File

@ -1 +1 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/equation.md","filePath":"zh/api/mp_math/equation.md"}'),t={name:"api/mp_math/equation.md"},l=n("",23),p=[l];function h(e,k,r,E,d,g){return a(),i("div",null,p)}const F=s(t,[["render",h]]);export{u as __pageData,F as default};
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/equation.md","filePath":"zh/api/mp_math/equation.md"}'),t={name:"api/mp_math/equation.md"},l=n("",23),p=[l];function h(k,e,r,E,c,d){return a(),i("div",null,p)}const F=s(t,[["render",h]]);export{u as __pageData,F as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{_ as l,c as t,j as s,a as n,a4 as a,o as i}from"./chunks/framework.DpC1ZpOZ.js";const Z=JSON.parse('{"title":"mbcp.mp_math.function","description":"","frontmatter":{"title":"mbcp.mp_math.function","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/function.md","filePath":"zh/api/mp_math/function.md"}'),e={name:"api/mp_math/function.md"},Q=a("",4),T={class:"tip custom-block github-alert"},h=s("p",{class:"custom-block-title"},"TIP",-1),p={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},r={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"8.471ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 3744.3 1000","aria-hidden":"true"},d=a("",1),o=[d],k=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mi",null,"f"),s("mo",{stretchy:"false"},"("),s("mi",null,"x"),s("mo",null,","),s("mi",null,"y"),s("mo",null,","),s("mi",null,"z"),s("mo",{stretchy:"false"},")")])],-1),m={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},g={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"10.19ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 4504 1000","aria-hidden":"true"},c=a("",1),y=[c],u=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mo",{stretchy:"false"},"("),s("msub",null,[s("mi",null,"x"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"y"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"z"),s("mn",null,"0")]),s("mo",{stretchy:"false"},")")])],-1),E={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},F={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-1.469ex"},xmlns:"http://www.w3.org/2000/svg",width:"29.427ex",height:"4.07ex",role:"img",focusable:"false",viewBox:"0 -1149.5 13006.8 1799","aria-hidden":"true"},f=a("",1),_=[f],C=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mi",{mathvariant:"normal"},"∇"),s("mi",null,"f"),s("mo",{stretchy:"false"},"("),s("msub",null,[s("mi",null,"x"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"y"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"z"),s("mn",null,"0")]),s("mo",{stretchy:"false"},")"),s("mo",null,"="),s("mrow",{"data-mjx-texclass":"INNER"},[s("mo",{"data-mjx-texclass":"OPEN"},"("),s("mfrac",null,[s("mrow",null,[s("mi",null,"∂"),s("mi",null,"f")]),s("mrow",null,[s("mi",null,"∂"),s("mi",null,"x")])]),s("mo",null,","),s("mfrac",null,[s("mrow",null,[s("mi",null,"∂"),s("mi",null,"f")]),s("mrow",null,[s("mi",null,"∂"),s("mi",null,"y")])]),s("mo",null,","),s("mfrac",null,[s("mrow",null,[s("mi",null,"∂"),s("mi",null,"f")]),s("mrow",null,[s("mi",null,"∂"),s("mi",null,"z")])]),s("mo",{"data-mjx-texclass":"CLOSE"},")")])])],-1),w=a("",13);function x(b,L,H,M,B,v){return i(),t("div",null,[Q,s("div",T,[h,s("p",null,[n("已知一个函数"),s("mjx-container",p,[(i(),t("svg",r,o)),k]),n(",则其在点"),s("mjx-container",m,[(i(),t("svg",g,y)),u]),n("处的梯度向量为: "),s("mjx-container",E,[(i(),t("svg",F,_)),C])])]),w])}const V=l(e,[["render",x]]);export{Z as __pageData,V as default};
import{_ as l,c as t,j as s,a as n,a4 as a,o as i}from"./chunks/framework.DpC1ZpOZ.js";const Z=JSON.parse('{"title":"mbcp.mp_math.function","description":"","frontmatter":{"title":"mbcp.mp_math.function","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/function.md","filePath":"zh/api/mp_math/function.md"}'),e={name:"api/mp_math/function.md"},Q=a("",4),T={class:"tip custom-block github-alert"},h=s("p",{class:"custom-block-title"},"TIP",-1),p={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},r={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"8.471ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 3744.3 1000","aria-hidden":"true"},d=a("",1),o=[d],k=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mi",null,"f"),s("mo",{stretchy:"false"},"("),s("mi",null,"x"),s("mo",null,","),s("mi",null,"y"),s("mo",null,","),s("mi",null,"z"),s("mo",{stretchy:"false"},")")])],-1),m={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},g={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"10.19ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 4504 1000","aria-hidden":"true"},c=a("",1),u=[c],y=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mo",{stretchy:"false"},"("),s("msub",null,[s("mi",null,"x"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"y"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"z"),s("mn",null,"0")]),s("mo",{stretchy:"false"},")")])],-1),E={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},F={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-1.469ex"},xmlns:"http://www.w3.org/2000/svg",width:"29.427ex",height:"4.07ex",role:"img",focusable:"false",viewBox:"0 -1149.5 13006.8 1799","aria-hidden":"true"},f=a("",1),_=[f],C=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mi",{mathvariant:"normal"},"∇"),s("mi",null,"f"),s("mo",{stretchy:"false"},"("),s("msub",null,[s("mi",null,"x"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"y"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"z"),s("mn",null,"0")]),s("mo",{stretchy:"false"},")"),s("mo",null,"="),s("mrow",{"data-mjx-texclass":"INNER"},[s("mo",{"data-mjx-texclass":"OPEN"},"("),s("mfrac",null,[s("mrow",null,[s("mi",null,"∂"),s("mi",null,"f")]),s("mrow",null,[s("mi",null,"∂"),s("mi",null,"x")])]),s("mo",null,","),s("mfrac",null,[s("mrow",null,[s("mi",null,"∂"),s("mi",null,"f")]),s("mrow",null,[s("mi",null,"∂"),s("mi",null,"y")])]),s("mo",null,","),s("mfrac",null,[s("mrow",null,[s("mi",null,"∂"),s("mi",null,"f")]),s("mrow",null,[s("mi",null,"∂"),s("mi",null,"z")])]),s("mo",{"data-mjx-texclass":"CLOSE"},")")])])],-1),w=a("",13);function x(b,L,H,M,B,v){return i(),t("div",null,[Q,s("div",T,[h,s("p",null,[n("已知一个函数"),s("mjx-container",p,[(i(),t("svg",r,o)),k]),n(",则其在点"),s("mjx-container",m,[(i(),t("svg",g,u)),y]),n("处的梯度向量为: "),s("mjx-container",E,[(i(),t("svg",F,_)),C])])]),w])}const V=l(e,[["render",x]]);export{Z as __pageData,V as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/line.md","filePath":"zh/api/mp_math/line.md"}'),t={name:"api/mp_math/line.md"},l=n(`<h1 id="mbcp-mp-math-line" tabindex="-1">mbcp.mp_math.line <a class="header-anchor" href="#mbcp-mp-math-line" aria-label="Permalink to &quot;mbcp.mp_math.line&quot;"></a></h1><p><strong>说明</strong>: 本模块定义了三维空间中的直线类</p><h3 id="class-line3" tabindex="-1"><em><strong>class</strong></em> <code>Line3</code> <a class="header-anchor" href="#class-line3" aria-label="Permalink to &quot;***class*** \`Line3\`&quot;"></a></h3><h4 id="def-init-self-point-point3-direction-vector3" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, point: Point3, direction: Vector3)</code> <a class="header-anchor" href="#def-init-self-point-point3-direction-vector3" aria-label="Permalink to &quot;***def*** \`__init__(self, point: Point3, direction: Vector3)\`&quot;"></a></h4><p><strong>说明</strong>: 三维空间中的直线。由一个点和一个方向向量确定。</p><p><strong>参数</strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): 直线上的一点</li><li>direction (<a href="./vector.html#class-vector3"><code>Vector3</code></a>): 方向向量</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L19" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, direction: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/line.md","filePath":"zh/api/mp_math/line.md"}'),t={name:"api/mp_math/line.md"},l=n(`<h1 id="mbcp-mp-math-line" tabindex="-1">mbcp.mp_math.line <a class="header-anchor" href="#mbcp-mp-math-line" aria-label="Permalink to &quot;mbcp.mp_math.line&quot;"></a></h1><p><strong>说明</strong>: 本模块定义了三维空间中的直线类</p><h3 id="class-line3" tabindex="-1"><em><strong>class</strong></em> <code>Line3</code> <a class="header-anchor" href="#class-line3" aria-label="Permalink to &quot;***class*** \`Line3\`&quot;"></a></h3><h4 id="func-init-self-point-point3-direction-vector3" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, point: Point3, direction: Vector3)</code> <a class="header-anchor" href="#func-init-self-point-point3-direction-vector3" aria-label="Permalink to &quot;***func*** \`__init__(self, point: Point3, direction: Vector3)\`&quot;"></a></h4><p><strong>说明</strong>: 三维空间中的直线。由一个点和一个方向向量确定。</p><p><strong>参数</strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): 直线上的一点</li><li>direction (<a href="./vector.html#class-vector3"><code>Vector3</code></a>): 方向向量</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L19" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, direction: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -6,7 +6,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> direction ([\`Vector3\`](./vector#class-vector3)): 方向向量</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> point</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> direction</span></span></code></pre></div></details><h4 id="def-approx-self-other-line3-epsilon-float-approx-bool" tabindex="-1"><em><strong>def</strong></em> <code>approx(self, other: Line3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#def-approx-self-other-line3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***def*** \`approx(self, other: Line3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L29" 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> direction</span></span></code></pre></div></details><h4 id="func-approx-self-other-line3-epsilon-float-approx-bool" tabindex="-1"><em><strong>func</strong></em> <code>approx(self, other: Line3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#func-approx-self-other-line3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***func*** \`approx(self, other: Line3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L29" 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -15,7 +15,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https://docs.python.org/3/library/functions.html#bool): 是否近似相等</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.is_approx_parallel(other, epsilon) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point).is_approx_parallel(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction, epsilon)</span></span></code></pre></div></details><h4 id="def-cal-angle-self-other-line3-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>cal_angle(self, other: Line3) -&gt; AnyAngle</code> <a class="header-anchor" href="#def-cal-angle-self-other-line3-anyangle" aria-label="Permalink to &quot;***def*** \`cal_angle(self, other: Line3) -&gt; AnyAngle\`&quot;"></a></h4><p><strong></strong>: 线线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./angle.html#class-anyangle"><code>AnyAngle</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L40" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_angle</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.is_approx_parallel(other, epsilon) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point).is_approx_parallel(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction, epsilon)</span></span></code></pre></div></details><h4 id="func-cal-angle-self-other-line3-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>cal_angle(self, other: Line3) -&gt; AnyAngle</code> <a class="header-anchor" href="#func-cal-angle-self-other-line3-anyangle" aria-label="Permalink to &quot;***func*** \`cal_angle(self, other: Line3) -&gt; AnyAngle\`&quot;"></a></h4><p><strong></strong>: 线线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./angle.html#class-anyangle"><code>AnyAngle</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L40" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_angle</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -23,7 +23,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`AnyAngle\`](./angle#class-anyangle): 夹角</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.direction.cal_angle(other.direction)</span></span></code></pre></div></details><h4 id="def-cal-distance-self-other-line3-point3-float" tabindex="-1"><em><strong>def</strong></em> <code>cal_distance(self, other: Line3 | Point3) -&gt; float</code> <a class="header-anchor" href="#def-cal-distance-self-other-line3-point3-float" aria-label="Permalink to &quot;***def*** \`cal_distance(self, other: Line3 | Point3) -&gt; float\`&quot;"></a></h4><p><strong></strong>: 线线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L50" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_distance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3 | Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </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:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.cal_angle(other.direction)</span></span></code></pre></div></details><h4 id="func-cal-distance-self-other-line3-point3-float" tabindex="-1"><em><strong>func</strong></em> <code>cal_distance(self, other: Line3 | Point3) -&gt; float</code> <a class="header-anchor" href="#func-cal-distance-self-other-line3-point3-float" aria-label="Permalink to &quot;***func*** \`cal_distance(self, other: Line3 | Point3) -&gt; float\`&quot;"></a></h4><p><strong></strong>: 线线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L50" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_distance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3 | Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </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;"> &quot;&quot;&quot;</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>
@ -45,7 +45,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other, Point3):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (other </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;">.point).cross(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction).length </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;">.direction.length</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type.&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-cal-intersection-self-other-line3-point3" tabindex="-1"><em><strong>def</strong></em> <code>cal_intersection(self, other: Line3) -&gt; Point3</code> <a class="header-anchor" href="#def-cal-intersection-self-other-line3-point3" aria-label="Permalink to &quot;***def*** \`cal_intersection(self, other: Line3) -&gt; Point3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>ValueError</code></a> 线</li><li><code>ValueError</code> 线</li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L80" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_intersection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type.&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-cal-intersection-self-other-line3-point3" tabindex="-1"><em><strong>func</strong></em> <code>cal_intersection(self, other: Line3) -&gt; Point3</code> <a class="header-anchor" href="#func-cal-intersection-self-other-line3-point3" aria-label="Permalink to &quot;***func*** \`cal_intersection(self, other: Line3) -&gt; Point3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>ValueError</code></a> 线</li><li><code>ValueError</code> 线</li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L80" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_intersection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -60,7 +60,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ValueError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Lines are parallel and do not intersect.&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> not</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.is_coplanar(other):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ValueError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Lines are not coplanar and do not intersect.&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </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;">.direction.cross(other.direction) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">@</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.direction.cross(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point) </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;">.direction.cross(other.direction).length </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;">.direction</span></span></code></pre></div></details><h4 id="def-cal-perpendicular-self-point-point3-line3" tabindex="-1"><em><strong>def</strong></em> <code>cal_perpendicular(self, point: Point3) -&gt; Line3</code> <a class="header-anchor" href="#def-cal-perpendicular-self-point-point3-line3" aria-label="Permalink to &quot;***def*** \`cal_perpendicular(self, point: Point3) -&gt; Line3\`&quot;"></a></h4><p><strong></strong>: 线p线</p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a>: 线</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L98" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_perpendicular</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </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;">.direction.cross(other.direction) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">@</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.direction.cross(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point) </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;">.direction.cross(other.direction).length </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;">.direction</span></span></code></pre></div></details><h4 id="func-cal-perpendicular-self-point-point3-line3" tabindex="-1"><em><strong>func</strong></em> <code>cal_perpendicular(self, point: Point3) -&gt; Line3</code> <a class="header-anchor" href="#func-cal-perpendicular-self-point-point3-line3" aria-label="Permalink to &quot;***func*** \`cal_perpendicular(self, point: Point3) -&gt; Line3\`&quot;"></a></h4><p><strong></strong>: 线p线</p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a>: 线</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L98" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_perpendicular</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 计算直线经过指定点p的垂线</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -68,7 +68,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`Line3\`](./line#class-line3): 垂线</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Line3(point, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.cross(point </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;">.point))</span></span></code></pre></div></details><h4 id="def-get-point-self-t-realnumber-point3" tabindex="-1"><em><strong>def</strong></em> <code>get_point(self, t: RealNumber) -&gt; Point3</code> <a class="header-anchor" href="#def-get-point-self-t-realnumber-point3" aria-label="Permalink to &quot;***def*** \`get_point(self, t: RealNumber) -&gt; Point3\`&quot;"></a></h4><p><strong></strong>: 线线t</p><p><strong></strong>:</p><blockquote><ul><li>t (<a href="./mp_math_typing.html#var-realnumber"><code>RealNumber</code></a>): t</li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L108" 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:#6F42C1;--shiki-dark:#B392F0;"> get_point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, t: RealNumber) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</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;"> Line3(point, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.cross(point </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;">.point))</span></span></code></pre></div></details><h4 id="func-get-point-self-t-realnumber-point3" tabindex="-1"><em><strong>func</strong></em> <code>get_point(self, t: RealNumber) -&gt; Point3</code> <a class="header-anchor" href="#func-get-point-self-t-realnumber-point3" aria-label="Permalink to &quot;***func*** \`get_point(self, t: RealNumber) -&gt; Point3\`&quot;"></a></h4><p><strong></strong>: 线线t</p><p><strong></strong>:</p><blockquote><ul><li>t (<a href="./mp_math_typing.html#var-realnumber"><code>RealNumber</code></a>): t</li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L108" 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:#6F42C1;--shiki-dark:#B392F0;"> get_point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, t: RealNumber) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 获取直线上的点同一条直线但起始点和方向向量不同则同一个t对应的点不同</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -76,13 +76,13 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`Point3\`](./point#class-point3): 点</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t </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;">.direction</span></span></code></pre></div></details><h4 id="def-get-parametric-equations-self-tuple-onesinglevarfunc-onesinglevarfunc-onesinglevarfunc" tabindex="-1"><em><strong>def</strong></em> <code>get_parametric_equations(self) -&gt; tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]</code> <a class="header-anchor" href="#def-get-parametric-equations-self-tuple-onesinglevarfunc-onesinglevarfunc-onesinglevarfunc" aria-label="Permalink to &quot;***def*** \`get_parametric_equations(self) -&gt; tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>: <a href="https://docs.python.org/3/library/stdtypes.html#tuple" target="_blank" rel="noreferrer"><code>tuple</code></a>[<a href="./mp_math_typing.html#var-onesinglevarfunc"><code>OneSingleVarFunc</code></a>, <code>OneSingleVarFunc</code>, <code>OneSingleVarFunc</code>]: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L118" 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:#6F42C1;--shiki-dark:#B392F0;"> get_parametric_equations</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:</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;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t </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;">.direction</span></span></code></pre></div></details><h4 id="func-get-parametric-equations-self-tuple-onesinglevarfunc-onesinglevarfunc-onesinglevarfunc" tabindex="-1"><em><strong>func</strong></em> <code>get_parametric_equations(self) -&gt; tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]</code> <a class="header-anchor" href="#func-get-parametric-equations-self-tuple-onesinglevarfunc-onesinglevarfunc-onesinglevarfunc" aria-label="Permalink to &quot;***func*** \`get_parametric_equations(self) -&gt; tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>: <a href="https://docs.python.org/3/library/stdtypes.html#tuple" target="_blank" rel="noreferrer"><code>tuple</code></a>[<a href="./mp_math_typing.html#var-onesinglevarfunc"><code>OneSingleVarFunc</code></a>, <code>OneSingleVarFunc</code>, <code>OneSingleVarFunc</code>]: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L118" 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:#6F42C1;--shiki-dark:#B392F0;"> get_parametric_equations</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> [\`tuple\`](https%3A//docs.python.org/3/library/stdtypes.html#tuple)[[\`OneSingleVarFunc\`](./mp_math_typing#var-onesinglevarfunc), \`OneSingleVarFunc\`, \`OneSingleVarFunc\`]: 参数方程</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">lambda</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.x </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;">.direction.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">lambda</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.y </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;">.direction.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">lambda</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.z </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;">.direction.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t)</span></span></code></pre></div></details><h4 id="def-is-approx-parallel-self-other-line3-epsilon-float-1e-06-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -&gt; bool</code> <a class="header-anchor" href="#def-is-approx-parallel-self-other-line3-epsilon-float-1e-06-bool" aria-label="Permalink to &quot;***def*** \`is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.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:#6F42C1;--shiki-dark:#B392F0;"> is_approx_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1e-06</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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;"> (</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">lambda</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.x </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;">.direction.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">lambda</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.y </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;">.direction.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">lambda</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.z </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;">.direction.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t)</span></span></code></pre></div></details><h4 id="func-is-approx-parallel-self-other-line3-epsilon-float-1e-06-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -&gt; bool</code> <a class="header-anchor" href="#func-is-approx-parallel-self-other-line3-epsilon-float-1e-06-bool" aria-label="Permalink to &quot;***func*** \`is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.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:#6F42C1;--shiki-dark:#B392F0;"> is_approx_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1e-06</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -91,7 +91,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否近似平行</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.direction.is_approx_parallel(other.direction, epsilon)</span></span></code></pre></div></details><h4 id="def-is-parallel-self-other-line3-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_parallel(self, other: Line3) -&gt; bool</code> <a class="header-anchor" href="#def-is-parallel-self-other-line3-bool" aria-label="Permalink to &quot;***def*** \`is_parallel(self, other: Line3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L139" 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:#6F42C1;--shiki-dark:#B392F0;"> is_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.is_approx_parallel(other.direction, epsilon)</span></span></code></pre></div></details><h4 id="func-is-parallel-self-other-line3-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_parallel(self, other: Line3) -&gt; bool</code> <a class="header-anchor" href="#func-is-parallel-self-other-line3-bool" aria-label="Permalink to &quot;***func*** \`is_parallel(self, other: Line3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L139" 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:#6F42C1;--shiki-dark:#B392F0;"> is_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -99,7 +99,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否平行</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.direction.is_parallel(other.direction)</span></span></code></pre></div></details><h4 id="def-is-collinear-self-other-line3-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_collinear(self, other: Line3) -&gt; bool</code> <a class="header-anchor" href="#def-is-collinear-self-other-line3-bool" aria-label="Permalink to &quot;***def*** \`is_collinear(self, other: Line3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: 线</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L149" 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:#6F42C1;--shiki-dark:#B392F0;"> is_collinear</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.is_parallel(other.direction)</span></span></code></pre></div></details><h4 id="func-is-collinear-self-other-line3-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_collinear(self, other: Line3) -&gt; bool</code> <a class="header-anchor" href="#func-is-collinear-self-other-line3-bool" aria-label="Permalink to &quot;***func*** \`is_collinear(self, other: Line3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: 线</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L149" 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:#6F42C1;--shiki-dark:#B392F0;"> is_collinear</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -107,7 +107,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否共线</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.is_parallel(other) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point).is_parallel(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction)</span></span></code></pre></div></details><h4 id="def-is-point-on-self-point-point3-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_point_on(self, point: Point3) -&gt; bool</code> <a class="header-anchor" href="#def-is-point-on-self-point-point3-bool" aria-label="Permalink to &quot;***def*** \`is_point_on(self, point: Point3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: 线</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L159" 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:#6F42C1;--shiki-dark:#B392F0;"> is_point_on</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.is_parallel(other) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point).is_parallel(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction)</span></span></code></pre></div></details><h4 id="func-is-point-on-self-point-point3-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_point_on(self, point: Point3) -&gt; bool</code> <a class="header-anchor" href="#func-is-point-on-self-point-point3-bool" aria-label="Permalink to &quot;***func*** \`is_point_on(self, point: Point3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: 线</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L159" 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:#6F42C1;--shiki-dark:#B392F0;"> is_point_on</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -115,7 +115,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否在直线上</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (point </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;">.point).is_parallel(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction)</span></span></code></pre></div></details><h4 id="def-is-coplanar-self-other-line3-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_coplanar(self, other: Line3) -&gt; bool</code> <a class="header-anchor" href="#def-is-coplanar-self-other-line3-bool" aria-label="Permalink to &quot;***def*** \`is_coplanar(self, other: Line3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线 线线0</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L169" 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:#6F42C1;--shiki-dark:#B392F0;"> is_coplanar</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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;"> (point </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;">.point).is_parallel(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction)</span></span></code></pre></div></details><h4 id="func-is-coplanar-self-other-line3-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_coplanar(self, other: Line3) -&gt; bool</code> <a class="header-anchor" href="#func-is-coplanar-self-other-line3-bool" aria-label="Permalink to &quot;***func*** \`is_coplanar(self, other: Line3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线 线线0</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L169" 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:#6F42C1;--shiki-dark:#B392F0;"> is_coplanar</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> 充要条件两直线方向向量的叉乘与两直线上任意一点的向量的点积为0</span></span>
@ -124,7 +124,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否共面</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.direction.cross(other.direction) </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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span></span></code></pre></div></details><h4 id="def-simplify-self" tabindex="-1"><em><strong>def</strong></em> <code>simplify(self)</code> <a class="header-anchor" href="#def-simplify-self" aria-label="Permalink to &quot;***def*** \`simplify(self)\`&quot;"></a></h4><p><strong></strong>: 线 </p><p>x y z 0 </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L180" 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:#6F42C1;--shiki-dark:#B392F0;"> simplify</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.cross(other.direction) </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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span></span></code></pre></div></details><h4 id="func-simplify-self" tabindex="-1"><em><strong>func</strong></em> <code>simplify(self)</code> <a class="header-anchor" href="#func-simplify-self" aria-label="Permalink to &quot;***func*** \`simplify(self)\`&quot;"></a></h4><p><strong></strong>: 线 </p><p>x y z 0 </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L180" 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:#6F42C1;--shiki-dark:#B392F0;"> simplify</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -137,7 +137,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="def-from-two-points-cls-p1-point3-p2-point3-line3" tabindex="-1"><em><strong>def</strong></em> <code>from_two_points(cls, p1: Point3, p2: Point3) -&gt; Line3</code> <a class="header-anchor" href="#def-from-two-points-cls-p1-point3-p2-point3-line3" aria-label="Permalink to &quot;***def*** \`from_two_points(cls, p1: Point3, p2: Point3) -&gt; Line3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>p1 (<a href="./point.html#class-point3"><code>Point3</code></a>): 1</li><li>p2 (<a href="./point.html#class-point3"><code>Point3</code></a>): 2</li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a>: 线</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L199" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="func-from-two-points-cls-p1-point3-p2-point3-line3" tabindex="-1"><em><strong>func</strong></em> <code>from_two_points(cls, p1: Point3, p2: Point3) -&gt; Line3</code> <a class="header-anchor" href="#func-from-two-points-cls-p1-point3-p2-point3-line3" aria-label="Permalink to &quot;***func*** \`from_two_points(cls, p1: Point3, p2: Point3) -&gt; Line3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>p1 (<a href="./point.html#class-point3"><code>Point3</code></a>): 1</li><li>p2 (<a href="./point.html#class-point3"><code>Point3</code></a>): 2</li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a>: 线</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L199" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> from_two_points</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(cls, p1: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, p2: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 工厂函数 由两点构造直线</span></span>
@ -148,7 +148,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> [\`Line3\`](./line#class-line3): 直线</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> direction </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p1</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(p1, direction)</span></span></code></pre></div></details><h4 id="def-and-self-other-line3-line3-point3-none" tabindex="-1"><em><strong>def</strong></em> <code>__and__(self, other: Line3) -&gt; Line3 | Point3 | None</code> <a class="header-anchor" href="#def-and-self-other-line3-line3-point3-none" aria-label="Permalink to &quot;***def*** \`__and__(self, other: Line3) -&gt; Line3 | Point3 | None\`&quot;"></a></h4><p><strong></strong>: 线线线None线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a> | <a href="https://docs.python.org/3/library/constants.html#None" target="_blank" rel="noreferrer"><code>None</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L211" 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;"> __and__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3 | Point3 | None&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(p1, direction)</span></span></code></pre></div></details><h4 id="func-and-self-other-line3-line3-point3-none" tabindex="-1"><em><strong>func</strong></em> <code>__and__(self, other: Line3) -&gt; Line3 | Point3 | None</code> <a class="header-anchor" href="#func-and-self-other-line3-line3-point3-none" aria-label="Permalink to &quot;***func*** \`__and__(self, other: Line3) -&gt; Line3 | Point3 | None\`&quot;"></a></h4><p><strong></strong>: 线线线None线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a> | <a href="https://docs.python.org/3/library/constants.html#None" target="_blank" rel="noreferrer"><code>None</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L211" 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;"> __and__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3 | Point3 | None&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 计算两条直线点集合的交集重合线返回自身平行线返回None交线返回交点</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -161,7 +161,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.is_parallel(other) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">or</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> not</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.is_coplanar(other):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> None</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>
<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;">.cal_intersection(other)</span></span></code></pre></div></details><h4 id="def-eq-self-other-bool" tabindex="-1"><em><strong>def</strong></em> <code>__eq__(self, other) -&gt; bool</code> <a class="header-anchor" href="#def-eq-self-other-bool" aria-label="Permalink to &quot;***def*** \`__eq__(self, other) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线</p><p>v1 // v2 (p1 - p2) // v1</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L226" 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) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.cal_intersection(other)</span></span></code></pre></div></details><h4 id="func-eq-self-other-bool" tabindex="-1"><em><strong>func</strong></em> <code>__eq__(self, other) -&gt; bool</code> <a class="header-anchor" href="#func-eq-self-other-bool" aria-label="Permalink to &quot;***func*** \`__eq__(self, other) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线</p><p>v1 // v2 (p1 - p2) // v1</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L226" 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) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 判断两条直线是否等价</span></span>
<span class="line"></span>

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/plane.md","filePath":"zh/api/mp_math/plane.md"}'),l={name:"api/mp_math/plane.md"},t=n(`<h1 id="mbcp-mp-math-plane" tabindex="-1">mbcp.mp_math.plane <a class="header-anchor" href="#mbcp-mp-math-plane" aria-label="Permalink to &quot;mbcp.mp_math.plane&quot;"></a></h1><p><strong>说明</strong>: 本模块定义了三维空间中的平面类</p><h3 id="class-plane3" tabindex="-1"><em><strong>class</strong></em> <code>Plane3</code> <a class="header-anchor" href="#class-plane3" aria-label="Permalink to &quot;***class*** \`Plane3\`&quot;"></a></h3><h4 id="def-init-self-a-float-b-float-c-float-d-float" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, a: float, b: float, c: float, d: float)</code> <a class="header-anchor" href="#def-init-self-a-float-b-float-c-float-d-float" aria-label="Permalink to &quot;***def*** \`__init__(self, a: float, b: float, c: float, d: float)\`&quot;"></a></h4><p><strong>说明</strong>: 平面方程ax + by + cz + d = 0</p><p><strong>参数</strong>:</p><blockquote><ul><li>a (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): x系数</li><li>b (<code>float</code>): y系数</li><li>c (<code>float</code>): z系数</li><li>d (<code>float</code>): 常数项</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L20" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, a: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, b: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, c: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, d: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/plane.md","filePath":"zh/api/mp_math/plane.md"}'),l={name:"api/mp_math/plane.md"},t=n(`<h1 id="mbcp-mp-math-plane" tabindex="-1">mbcp.mp_math.plane <a class="header-anchor" href="#mbcp-mp-math-plane" aria-label="Permalink to &quot;mbcp.mp_math.plane&quot;"></a></h1><p><strong>说明</strong>: 本模块定义了三维空间中的平面类</p><h3 id="class-plane3" tabindex="-1"><em><strong>class</strong></em> <code>Plane3</code> <a class="header-anchor" href="#class-plane3" aria-label="Permalink to &quot;***class*** \`Plane3\`&quot;"></a></h3><h4 id="func-init-self-a-float-b-float-c-float-d-float" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, a: float, b: float, c: float, d: float)</code> <a class="header-anchor" href="#func-init-self-a-float-b-float-c-float-d-float" aria-label="Permalink to &quot;***func*** \`__init__(self, a: float, b: float, c: float, d: float)\`&quot;"></a></h4><p><strong>说明</strong>: 平面方程ax + by + cz + d = 0</p><p><strong>参数</strong>:</p><blockquote><ul><li>a (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): x系数</li><li>b (<code>float</code>): y系数</li><li>c (<code>float</code>): z系数</li><li>d (<code>float</code>): 常数项</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L20" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, a: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, b: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, c: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, d: </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;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 平面方程ax + by + cz + d = 0</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -10,7 +10,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> a</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.b </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> b</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> c</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.d </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> d</span></span></code></pre></div></details><h4 id="def-approx-self-other-plane3-bool" tabindex="-1"><em><strong>def</strong></em> <code>approx(self, other: Plane3) -&gt; bool</code> <a class="header-anchor" href="#def-approx-self-other-plane3-bool" aria-label="Permalink to &quot;***def*** \`approx(self, other: Plane3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L34" 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.d </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> d</span></span></code></pre></div></details><h4 id="func-approx-self-other-plane3-bool" tabindex="-1"><em><strong>func</strong></em> <code>approx(self, other: Plane3) -&gt; bool</code> <a class="header-anchor" href="#func-approx-self-other-plane3-bool" aria-label="Permalink to &quot;***func*** \`approx(self, other: Plane3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L34" 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -28,7 +28,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> k </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.c </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;">.c</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> approx(other.a, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> k) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> approx(other.b, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.b </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> k) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> approx(other.d, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.d </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> k)</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> False</span></span></code></pre></div></details><h4 id="def-cal-angle-self-other-line3-plane3-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>cal_angle(self, other: Line3 | Plane3) -&gt; AnyAngle</code> <a class="header-anchor" href="#def-cal-angle-self-other-line3-plane3-anyangle" aria-label="Permalink to &quot;***def*** \`cal_angle(self, other: Line3 | Plane3) -&gt; AnyAngle\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./plane.html#class-plane3"><code>Plane3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./angle.html#class-anyangle"><code>AnyAngle</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L54" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_angle</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3 | Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> False</span></span></code></pre></div></details><h4 id="func-cal-angle-self-other-line3-plane3-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>cal_angle(self, other: Line3 | Plane3) -&gt; AnyAngle</code> <a class="header-anchor" href="#func-cal-angle-self-other-line3-plane3-anyangle" aria-label="Permalink to &quot;***func*** \`cal_angle(self, other: Line3 | Plane3) -&gt; AnyAngle\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./plane.html#class-plane3"><code>Plane3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./angle.html#class-anyangle"><code>AnyAngle</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L54" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_angle</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3 | Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -43,7 +43,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other, Plane3):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> AnyAngle(math.acos(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.normal </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">@</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.normal </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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.normal.length </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.normal.length)), </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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> else</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-cal-distance-self-other-plane3-point3-float" tabindex="-1"><em><strong>def</strong></em> <code>cal_distance(self, other: Plane3 | Point3) -&gt; float</code> <a class="header-anchor" href="#def-cal-distance-self-other-plane3-point3-float" aria-label="Permalink to &quot;***def*** \`cal_distance(self, other: Plane3 | Point3) -&gt; float\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L71" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_distance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3 | Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </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:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-cal-distance-self-other-plane3-point3-float" tabindex="-1"><em><strong>func</strong></em> <code>cal_distance(self, other: Plane3 | Point3) -&gt; float</code> <a class="header-anchor" href="#func-cal-distance-self-other-plane3-point3-float" aria-label="Permalink to &quot;***func*** \`cal_distance(self, other: Plane3 | Point3) -&gt; float\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L71" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_distance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3 | Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </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;"> &quot;&quot;&quot;</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>
@ -58,7 +58,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other, Point3):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x </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;">.b </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y </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;">.c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z </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;">.d) </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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a </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;">.b </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;">.c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">**</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">**</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0.5</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-cal-intersection-line3-self-other-plane3-line3" tabindex="-1"><em><strong>def</strong></em> <code>cal_intersection_line3(self, other: Plane3) -&gt; Line3</code> <a class="header-anchor" href="#def-cal-intersection-line3-self-other-plane3-line3" aria-label="Permalink to &quot;***def*** \`cal_intersection_line3(self, other: Plane3) -&gt; Line3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a>: 线</p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#ValueError" target="_blank" rel="noreferrer"><code>ValueError</code></a> 线</li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L88" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_intersection_line3</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-cal-intersection-line3-self-other-plane3-line3" tabindex="-1"><em><strong>func</strong></em> <code>cal_intersection_line3(self, other: Plane3) -&gt; Line3</code> <a class="header-anchor" href="#func-cal-intersection-line3-self-other-plane3-line3" aria-label="Permalink to &quot;***func*** \`cal_intersection_line3(self, other: Plane3) -&gt; Line3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a>: 线</p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#ValueError" target="_blank" rel="noreferrer"><code>ValueError</code></a> 线</li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L88" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_intersection_line3</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -84,7 +84,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> A </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> np.array([[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.b], [other.a, other.b]])</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> B </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> np.array([</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;">.d, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">other.d])</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x, y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> np.linalg.solve(A, B)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Line3(Point3(x, y, z), direction)</span></span></code></pre></div></details><h4 id="def-cal-intersection-point3-self-other-line3-point3" tabindex="-1"><em><strong>def</strong></em> <code>cal_intersection_point3(self, other: Line3) -&gt; Point3</code> <a class="header-anchor" href="#def-cal-intersection-point3-self-other-line3-point3" aria-label="Permalink to &quot;***def*** \`cal_intersection_point3(self, other: Line3) -&gt; Point3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#ValueError" target="_blank" rel="noreferrer"><code>ValueError</code></a> 线</li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L121" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_intersection_point3</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</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;"> Line3(Point3(x, y, z), direction)</span></span></code></pre></div></details><h4 id="func-cal-intersection-point3-self-other-line3-point3" tabindex="-1"><em><strong>func</strong></em> <code>cal_intersection_point3(self, other: Line3) -&gt; Point3</code> <a class="header-anchor" href="#func-cal-intersection-point3-self-other-line3-point3" aria-label="Permalink to &quot;***func*** \`cal_intersection_point3(self, other: Line3) -&gt; Point3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#ValueError" target="_blank" rel="noreferrer"><code>ValueError</code></a> 线</li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L121" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_intersection_point3</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -98,7 +98,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ValueError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;The plane and the line are parallel or coincident.&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x, y, z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.get_parametric_equations()</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point.x </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;">.b </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point.y </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;">.c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point.z </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;">.d) </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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.direction.x </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;">.b </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.direction.y </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;">.c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.direction.z)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(x(t), y(t), z(t))</span></span></code></pre></div></details><h4 id="def-cal-parallel-plane3-self-point-point3-plane3" tabindex="-1"><em><strong>def</strong></em> <code>cal_parallel_plane3(self, point: Point3) -&gt; Plane3</code> <a class="header-anchor" href="#def-cal-parallel-plane3-self-point-point3-plane3" aria-label="Permalink to &quot;***def*** \`cal_parallel_plane3(self, point: Point3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./plane.html#class-plane3"><code>Plane3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L141" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_parallel_plane3</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</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;"> Point3(x(t), y(t), z(t))</span></span></code></pre></div></details><h4 id="func-cal-parallel-plane3-self-point-point3-plane3" tabindex="-1"><em><strong>func</strong></em> <code>cal_parallel_plane3(self, point: Point3) -&gt; Plane3</code> <a class="header-anchor" href="#func-cal-parallel-plane3-self-point-point3-plane3" aria-label="Permalink to &quot;***func*** \`cal_parallel_plane3(self, point: Point3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./plane.html#class-plane3"><code>Plane3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L141" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_parallel_plane3</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -106,7 +106,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<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;"> [\`Plane3\`](./plane#class-plane3): 平面</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Plane3.from_point_and_normal(point, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.normal)</span></span></code></pre></div></details><h4 id="def-is-parallel-self-other-plane3-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_parallel(self, other: Plane3) -&gt; bool</code> <a class="header-anchor" href="#def-is-parallel-self-other-plane3-bool" aria-label="Permalink to &quot;***def*** \`is_parallel(self, other: Plane3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.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:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> is_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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;"> Plane3.from_point_and_normal(point, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.normal)</span></span></code></pre></div></details><h4 id="func-is-parallel-self-other-plane3-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_parallel(self, other: Plane3) -&gt; bool</code> <a class="header-anchor" href="#func-is-parallel-self-other-plane3-bool" aria-label="Permalink to &quot;***func*** \`is_parallel(self, other: Plane3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.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:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> is_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -114,14 +114,14 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否平行</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.normal.is_parallel(other.normal)</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="def-normal-self-vector3" tabindex="-1"><em><strong>def</strong></em> <code>normal(self) -&gt; Vector3</code> <a class="header-anchor" href="#def-normal-self-vector3" aria-label="Permalink to &quot;***def*** \`normal(self) -&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>: <a href="./vector.html#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L162" 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>
<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;">.normal.is_parallel(other.normal)</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="func-normal-self-vector3" tabindex="-1"><em><strong>func</strong></em> <code>normal(self) -&gt; Vector3</code> <a class="header-anchor" href="#func-normal-self-vector3" aria-label="Permalink to &quot;***func*** \`normal(self) -&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>: <a href="./vector.html#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L162" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> normal</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> [\`Vector3\`](./vector#class-vector3): 法向量</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.b, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.c)</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="def-from-point-and-normal-cls-point-point3-normal-vector3-plane3" tabindex="-1"><em><strong>def</strong></em> <code>from_point_and_normal(cls, point: Point3, normal: Vector3) -&gt; Plane3</code> <a class="header-anchor" href="#def-from-point-and-normal-cls-point-point3-normal-vector3-plane3" aria-label="Permalink to &quot;***def*** \`from_point_and_normal(cls, point: Point3, normal: Vector3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: ()</p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li><li>normal (<a href="./vector.html#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./plane.html#class-plane3"><code>Plane3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L171" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.b, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.c)</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="func-from-point-and-normal-cls-point-point3-normal-vector3-plane3" tabindex="-1"><em><strong>func</strong></em> <code>from_point_and_normal(cls, point: Point3, normal: Vector3) -&gt; Plane3</code> <a class="header-anchor" href="#func-from-point-and-normal-cls-point-point3-normal-vector3-plane3" aria-label="Permalink to &quot;***func*** \`from_point_and_normal(cls, point: Point3, normal: Vector3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: ()</p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li><li>normal (<a href="./vector.html#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./plane.html#class-plane3"><code>Plane3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L171" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> from_point_and_normal</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(cls, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, normal: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 工厂函数 由点和法向量构造平面(点法式构造)</span></span>
@ -133,7 +133,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> a, b, c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (normal.x, normal.y, normal.z)</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> d </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> -</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">a </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> point.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> b </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> point.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> point.z</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(a, b, c, d)</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="def-from-three-points-cls-p1-point3-p2-point3-p3-point3-plane3" tabindex="-1"><em><strong>def</strong></em> <code>from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -&gt; Plane3</code> <a class="header-anchor" href="#def-from-three-points-cls-p1-point3-p2-point3-p3-point3-plane3" aria-label="Permalink to &quot;***def*** \`from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>p1 (<a href="./point.html#class-point3"><code>Point3</code></a>): 1</li><li>p2 (<code>Point3</code>): 2</li><li>p3 (<code>Point3</code>): 3</li></ul></blockquote><p><strong></strong>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L185" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(a, b, c, d)</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="func-from-three-points-cls-p1-point3-p2-point3-p3-point3-plane3" tabindex="-1"><em><strong>func</strong></em> <code>from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -&gt; Plane3</code> <a class="header-anchor" href="#func-from-three-points-cls-p1-point3-p2-point3-p3-point3-plane3" aria-label="Permalink to &quot;***func*** \`from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>p1 (<a href="./point.html#class-point3"><code>Point3</code></a>): 1</li><li>p2 (<code>Point3</code>): 2</li><li>p3 (<code>Point3</code>): 3</li></ul></blockquote><p><strong></strong>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L185" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> from_three_points</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(cls, p1: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, p2: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, p3: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 工厂函数 由三点构造平面</span></span>
@ -147,7 +147,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> v1 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p1</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> v2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p3 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p1</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> normal </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> v1.cross(v2)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.from_point_and_normal(p1, normal)</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="def-from-two-lines-cls-l1-line3-l2-line3-plane3" tabindex="-1"><em><strong>def</strong></em> <code>from_two_lines(cls, l1: Line3, l2: Line3) -&gt; Plane3</code> <a class="header-anchor" href="#def-from-two-lines-cls-l1-line3-l2-line3-plane3" aria-label="Permalink to &quot;***def*** \`from_two_lines(cls, l1: Line3, l2: Line3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>l1 (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li><li>l2 (<code>Line3</code>): 线</li></ul></blockquote><p><strong></strong>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L203" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.from_point_and_normal(p1, normal)</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="func-from-two-lines-cls-l1-line3-l2-line3-plane3" tabindex="-1"><em><strong>func</strong></em> <code>from_two_lines(cls, l1: Line3, l2: Line3) -&gt; Plane3</code> <a class="header-anchor" href="#func-from-two-lines-cls-l1-line3-l2-line3-plane3" aria-label="Permalink to &quot;***func*** \`from_two_lines(cls, l1: Line3, l2: Line3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>l1 (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li><li>l2 (<code>Line3</code>): 线</li></ul></blockquote><p><strong></strong>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L203" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> from_two_lines</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(cls, l1: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, l2: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 工厂函数 由两直线构造平面</span></span>
@ -161,7 +161,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> v2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> l2.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> l1.point</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> v2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> zero_vector3:</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> v2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> l2.get_point(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> l1.point</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.from_point_and_normal(l1.point, v1.cross(v2))</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="def-from-point-and-line-cls-point-point3-line-line3-plane3" tabindex="-1"><em><strong>def</strong></em> <code>from_point_and_line(cls, point: Point3, line: Line3) -&gt; Plane3</code> <a class="header-anchor" href="#def-from-point-and-line-cls-point-point3-line-line3-plane3" aria-label="Permalink to &quot;***def*** \`from_point_and_line(cls, point: Point3, line: Line3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li><li>line (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L219" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.from_point_and_normal(l1.point, v1.cross(v2))</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="func-from-point-and-line-cls-point-point3-line-line3-plane3" tabindex="-1"><em><strong>func</strong></em> <code>from_point_and_line(cls, point: Point3, line: Line3) -&gt; Plane3</code> <a class="header-anchor" href="#func-from-point-and-line-cls-point-point3-line-line3-plane3" aria-label="Permalink to &quot;***func*** \`from_point_and_line(cls, point: Point3, line: Line3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li><li>line (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L219" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> from_point_and_line</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(cls, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, line: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 工厂函数 由点和直线构造平面</span></span>
@ -171,11 +171,11 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<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;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.from_point_and_normal(point, line.direction)</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-and-self-other-line3-point3-none" tabindex="-1"><em><strong>def</strong></em> <code>__and__(self, other: Line3) -&gt; Point3 | None</code> <a class="header-anchor" href="#def-and-self-other-line3-point3-none" aria-label="Permalink to &quot;***def*** \`__and__(self, other: Line3) -&gt; Point3 | None\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L256" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.from_point_and_normal(point, line.direction)</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-and-self-other-line3-point3-none" tabindex="-1"><em><strong>func</strong></em> <code>__and__(self, other: Line3) -&gt; Point3 | None</code> <a class="header-anchor" href="#func-and-self-other-line3-point3-none" aria-label="Permalink to &quot;***func*** \`__and__(self, other: Line3) -&gt; Point3 | None\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L256" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __and__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3 | None&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-and-self-other-plane3-line3-none" tabindex="-1"><em><strong>def</strong></em> <code>__and__(self, other: Plane3) -&gt; Line3 | None</code> <a class="header-anchor" href="#def-and-self-other-plane3-line3-none" aria-label="Permalink to &quot;***def*** \`__and__(self, other: Plane3) -&gt; Line3 | None\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L260" 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-and-self-other-plane3-line3-none" tabindex="-1"><em><strong>func</strong></em> <code>__and__(self, other: Plane3) -&gt; Line3 | None</code> <a class="header-anchor" href="#func-and-self-other-plane3-line3-none" aria-label="Permalink to &quot;***func*** \`__and__(self, other: Plane3) -&gt; Line3 | None\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L260" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __and__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3 | None&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="def-and-self-other" tabindex="-1"><em><strong>def</strong></em> <code>__and__(self, other)</code> <a class="header-anchor" href="#def-and-self-other" aria-label="Permalink to &quot;***def*** \`__and__(self, other)\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./plane.html#class-plane3"><code>Plane3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a> | <a href="https://docs.python.org/3/library/constants.html#None" target="_blank" rel="noreferrer"><code>None</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L263" 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;"> __and__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other):</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="func-and-self-other" tabindex="-1"><em><strong>func</strong></em> <code>__and__(self, other)</code> <a class="header-anchor" href="#func-and-self-other" aria-label="Permalink to &quot;***func*** \`__and__(self, other)\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./plane.html#class-plane3"><code>Plane3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a> | <a href="https://docs.python.org/3/library/constants.html#None" target="_blank" rel="noreferrer"><code>None</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L263" 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;"> __and__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -194,7 +194,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> None</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;">.cal_intersection_point3(other)</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for &amp;: &#39;Plane3&#39; and &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-eq-self-other-bool" tabindex="-1"><em><strong>def</strong></em> <code>__eq__(self, other) -&gt; bool</code> <a class="header-anchor" href="#def-eq-self-other-bool" aria-label="Permalink to &quot;***def*** \`__eq__(self, other) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L284" 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) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for &amp;: &#39;Plane3&#39; and &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-eq-self-other-bool" tabindex="-1"><em><strong>func</strong></em> <code>__eq__(self, other) -&gt; bool</code> <a class="header-anchor" href="#func-eq-self-other-bool" aria-label="Permalink to &quot;***func*** \`__eq__(self, other) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L284" 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) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -202,5 +202,5 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否等价</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.approx(other)</span></span></code></pre></div></details><h4 id="def-rand-self-other-line3-point3" tabindex="-1"><em><strong>def</strong></em> <code>__rand__(self, other: Line3) -&gt; Point3</code> <a class="header-anchor" href="#def-rand-self-other-line3-point3" aria-label="Permalink to &quot;***def*** \`__rand__(self, other: Line3) -&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L294" 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;"> __rand__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.cal_intersection_point3(other)</span></span></code></pre></div></details>`,113),h=[t];function p(e,k,r,o,d,E){return a(),i("div",null,h)}const F=s(l,[["render",p]]);export{y as __pageData,F as default};
<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;">.approx(other)</span></span></code></pre></div></details><h4 id="func-rand-self-other-line3-point3" tabindex="-1"><em><strong>func</strong></em> <code>__rand__(self, other: Line3) -&gt; Point3</code> <a class="header-anchor" href="#func-rand-self-other-line3-point3" aria-label="Permalink to &quot;***func*** \`__rand__(self, other: Line3) -&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L294" 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;"> __rand__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.cal_intersection_point3(other)</span></span></code></pre></div></details>`,113),h=[t];function p(e,k,r,o,d,E){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{c as __pageData,y as default};

View File

@ -1 +1 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/plane.md","filePath":"zh/api/mp_math/plane.md"}'),l={name:"api/mp_math/plane.md"},t=n("",113),h=[t];function p(e,k,r,o,d,E){return a(),i("div",null,h)}const F=s(l,[["render",p]]);export{y as __pageData,F as default};
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/plane.md","filePath":"zh/api/mp_math/plane.md"}'),l={name:"api/mp_math/plane.md"},t=n("",113),h=[t];function p(e,k,r,o,d,E){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{c as __pageData,y as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/point.md","filePath":"zh/api/mp_math/point.md"}'),n={name:"api/mp_math/point.md"},l=t(`<h1 id="mbcp-mp-math-point" tabindex="-1">mbcp.mp_math.point <a class="header-anchor" href="#mbcp-mp-math-point" aria-label="Permalink to &quot;mbcp.mp_math.point&quot;"></a></h1><p><strong>说明</strong>: 本模块定义了三维空间中点的类。</p><h3 id="class-point3" tabindex="-1"><em><strong>class</strong></em> <code>Point3</code> <a class="header-anchor" href="#class-point3" aria-label="Permalink to &quot;***class*** \`Point3\`&quot;"></a></h3><h4 id="def-init-self-x-float-y-float-z-float" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, x: float, y: float, z: float)</code> <a class="header-anchor" href="#def-init-self-x-float-y-float-z-float" aria-label="Permalink to &quot;***def*** \`__init__(self, x: float, y: float, z: float)\`&quot;"></a></h4><p><strong>说明</strong>: 笛卡尔坐标系中的点。</p><p><strong>参数</strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): x 坐标</li><li>y (<code>float</code>): y 坐标</li><li>z (<code>float</code>): z 坐标</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L15" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, z: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/point.md","filePath":"zh/api/mp_math/point.md"}'),n={name:"api/mp_math/point.md"},l=t(`<h1 id="mbcp-mp-math-point" tabindex="-1">mbcp.mp_math.point <a class="header-anchor" href="#mbcp-mp-math-point" aria-label="Permalink to &quot;mbcp.mp_math.point&quot;"></a></h1><p><strong>说明</strong>: 本模块定义了三维空间中点的类。</p><h3 id="class-point3" tabindex="-1"><em><strong>class</strong></em> <code>Point3</code> <a class="header-anchor" href="#class-point3" aria-label="Permalink to &quot;***class*** \`Point3\`&quot;"></a></h3><h4 id="func-init-self-x-float-y-float-z-float" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, x: float, y: float, z: float)</code> <a class="header-anchor" href="#func-init-self-x-float-y-float-z-float" aria-label="Permalink to &quot;***func*** \`__init__(self, x: float, y: float, z: float)\`&quot;"></a></h4><p><strong>说明</strong>: 笛卡尔坐标系中的点。</p><p><strong>参数</strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): x 坐标</li><li>y (<code>float</code>): y 坐标</li><li>z (<code>float</code>): z 坐标</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L15" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, z: </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;"> &quot;&quot;&quot;</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>
@ -8,7 +8,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> y</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> z</span></span></code></pre></div></details><h4 id="def-approx-self-other-point3-epsilon-float-approx-bool" tabindex="-1"><em><strong>def</strong></em> <code>approx(self, other: Point3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#def-approx-self-other-point3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***def*** \`approx(self, other: Point3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L27" 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> z</span></span></code></pre></div></details><h4 id="func-approx-self-other-point3-epsilon-float-approx-bool" tabindex="-1"><em><strong>func</strong></em> <code>approx(self, other: Point3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#func-approx-self-other-point3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***func*** \`approx(self, other: Point3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L27" 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -17,11 +17,11 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`bool\`](https://docs.python.org/3/library/functions.html#bool): 是否近似相等</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> all</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon])</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-vector3-point3" tabindex="-1"><em><strong>def</strong></em> <code>self + other: Vector3 =&gt; Point3</code> <a class="header-anchor" href="#def-self-other-vector3-point3" aria-label="Permalink to &quot;***def*** \`self + other: Vector3 =&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L47" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> all</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon])</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-vector3-point3" tabindex="-1"><em><strong>func</strong></em> <code>self + other: Vector3 =&gt; Point3</code> <a class="header-anchor" href="#func-self-other-vector3-point3" aria-label="Permalink to &quot;***func*** \`self + other: Vector3 =&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L47" 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>
<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;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-point3-point3" tabindex="-1"><em><strong>def</strong></em> <code>self + other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#def-self-other-point3-point3" aria-label="Permalink to &quot;***def*** \`self + other: Point3 =&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L51" 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-point3-point3" tabindex="-1"><em><strong>func</strong></em> <code>self + other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#func-self-other-point3-point3" aria-label="Permalink to &quot;***func*** \`self + other: Point3 =&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L51" 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>
<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;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="def-self-other" tabindex="-1"><em><strong>def</strong></em> <code>self + other</code> <a class="header-anchor" href="#def-self-other" aria-label="Permalink to &quot;***def*** \`self + other\`&quot;"></a></h4><p><strong></strong>: P + V -&gt; P P + P -&gt; P</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./vector.html#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L54" 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="func-self-other" tabindex="-1"><em><strong>func</strong></em> <code>self + other</code> <a class="header-anchor" href="#func-self-other" aria-label="Permalink to &quot;***func*** \`self + other\`&quot;"></a></h4><p><strong></strong>: P + V -&gt; P P + P -&gt; P</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./vector.html#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L54" 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>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> P + V -&gt; P</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> P + P -&gt; P</span></span>
@ -30,7 +30,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`Point3\`](./point#class-point3): 新的点</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</span></span></code></pre></div></details><h4 id="def-eq-self-other" tabindex="-1"><em><strong>def</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#def-eq-self-other" aria-label="Permalink to &quot;***def*** \`__eq__(self, other)\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L65" 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;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</span></span></code></pre></div></details><h4 id="func-eq-self-other" tabindex="-1"><em><strong>func</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#func-eq-self-other" aria-label="Permalink to &quot;***func*** \`__eq__(self, other)\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L65" 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:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -38,7 +38,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`bool\`](https://docs.python.org/3/library/functions.html#bool): 是否相等</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.x, other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.y, other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.z, other.z)</span></span></code></pre></div></details><h4 id="def-self-other-point3-vector3" tabindex="-1"><em><strong>def</strong></em> <code>self - other: Point3 =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-point3-vector3" aria-label="Permalink to &quot;***def*** \`self - other: Point3 =&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: P - P -&gt; V</p><p>P - V -&gt; P <a href="./vector.html#class-vector3"><code>Vector3</code></a> </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./vector.html#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.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:#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;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</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;"> approx(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x, other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.y, other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.z, other.z)</span></span></code></pre></div></details><h4 id="func-self-other-point3-vector3" tabindex="-1"><em><strong>func</strong></em> <code>self - other: Point3 =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-point3-vector3" aria-label="Permalink to &quot;***func*** \`self - other: Point3 =&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: P - P -&gt; V</p><p>P - V -&gt; P <a href="./vector.html#class-vector3"><code>Vector3</code></a> </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./vector.html#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.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:#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;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> P - P -&gt; V</span></span>
<span class="line"></span>
@ -49,4 +49,4 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> [\`Vector3\`](./vector#class-vector3): 新的向量</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> from</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> .vector </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</span></span></code></pre></div></details>`,39),h=[l];function e(p,k,o,r,d,g){return a(),i("div",null,h)}const y=s(n,[["render",e]]);export{E as __pageData,y as default};
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</span></span></code></pre></div></details>`,39),h=[l];function p(e,k,o,r,d,c){return a(),i("div",null,h)}const y=s(n,[["render",p]]);export{E as __pageData,y as default};

View File

@ -1 +1 @@
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/point.md","filePath":"zh/api/mp_math/point.md"}'),n={name:"api/mp_math/point.md"},l=t("",39),h=[l];function e(p,k,o,r,d,g){return a(),i("div",null,h)}const y=s(n,[["render",e]]);export{E as __pageData,y as default};
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/point.md","filePath":"zh/api/mp_math/point.md"}'),n={name:"api/mp_math/point.md"},l=t("",39),h=[l];function p(e,k,o,r,d,c){return a(),i("div",null,h)}const y=s(n,[["render",p]]);export{E as __pageData,y as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/segment.md","filePath":"zh/api/mp_math/segment.md"}'),t={name:"api/mp_math/segment.md"},p=n(`<h1 id="mbcp-mp-math-segment" tabindex="-1">mbcp.mp_math.segment <a class="header-anchor" href="#mbcp-mp-math-segment" aria-label="Permalink to &quot;mbcp.mp_math.segment&quot;"></a></h1><p><strong>说明</strong>: 本模块定义了三维空间中的线段类</p><h3 id="class-segment3" tabindex="-1"><em><strong>class</strong></em> <code>Segment3</code> <a class="header-anchor" href="#class-segment3" aria-label="Permalink to &quot;***class*** \`Segment3\`&quot;"></a></h3><h4 id="def-init-self-p1-point3-p2-point3" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, p1: Point3, p2: Point3)</code> <a class="header-anchor" href="#def-init-self-p1-point3-p2-point3" aria-label="Permalink to &quot;***def*** \`__init__(self, p1: Point3, p2: Point3)\`&quot;"></a></h4><p><strong>说明</strong>: 三维空间中的线段。</p><p><strong>参数</strong>:</p><blockquote><ul><li>p1 (<a href="./point.html#class-point3"><code>Point3</code></a>): 线段的一个端点</li><li>p2 (<a href="./point.html#class-point3"><code>Point3</code></a>): 线段的另一个端点</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/segment.py#L14" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, p1: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, p2: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/segment.md","filePath":"zh/api/mp_math/segment.md"}'),t={name:"api/mp_math/segment.md"},p=n(`<h1 id="mbcp-mp-math-segment" tabindex="-1">mbcp.mp_math.segment <a class="header-anchor" href="#mbcp-mp-math-segment" aria-label="Permalink to &quot;mbcp.mp_math.segment&quot;"></a></h1><p><strong>说明</strong>: 本模块定义了三维空间中的线段类</p><h3 id="class-segment3" tabindex="-1"><em><strong>class</strong></em> <code>Segment3</code> <a class="header-anchor" href="#class-segment3" aria-label="Permalink to &quot;***class*** \`Segment3\`&quot;"></a></h3><h4 id="func-init-self-p1-point3-p2-point3" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, p1: Point3, p2: Point3)</code> <a class="header-anchor" href="#func-init-self-p1-point3-p2-point3" aria-label="Permalink to &quot;***func*** \`__init__(self, p1: Point3, p2: Point3)\`&quot;"></a></h4><p><strong>说明</strong>: 三维空间中的线段。</p><p><strong>参数</strong>:</p><blockquote><ul><li>p1 (<a href="./point.html#class-point3"><code>Point3</code></a>): 线段的一个端点</li><li>p2 (<a href="./point.html#class-point3"><code>Point3</code></a>): 线段的另一个端点</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/segment.py#L14" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, p1: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, p2: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/utils.md","filePath":"zh/api/mp_math/utils.md"}'),n={name:"api/mp_math/utils.md"},l=t(`<h1 id="mbcp-mp-math-utils" tabindex="-1">mbcp.mp_math.utils <a class="header-anchor" href="#mbcp-mp-math-utils" aria-label="Permalink to &quot;mbcp.mp_math.utils&quot;"></a></h1><p><strong>说明</strong>: 本模块定义了一些常用的工具函数</p><h3 id="def-clamp-x-float-min-float-max-float-float" tabindex="-1"><em><strong>def</strong></em> <code>clamp(x: float, min_: float, max_: float) -&gt; float</code> <a class="header-anchor" href="#def-clamp-x-float-min-float-max-float-float" aria-label="Permalink to &quot;***def*** \`clamp(x: float, min_: float, max_: float) -&gt; float\`&quot;"></a></h3><p><strong>说明</strong>: 区间限定函数</p><p><strong>参数</strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): 值</li><li>min_ (<code>float</code>): 最小值</li><li>max_ (<code>float</code>): 最大值</li></ul></blockquote><p><strong>返回</strong>: <code>float</code>: 限定在区间内的值</p><details><summary><b>源代码</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L17" 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:#6F42C1;--shiki-dark:#B392F0;"> clamp</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, min_: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, max_: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/utils.md","filePath":"zh/api/mp_math/utils.md"}'),n={name:"api/mp_math/utils.md"},l=t(`<h1 id="mbcp-mp-math-utils" tabindex="-1">mbcp.mp_math.utils <a class="header-anchor" href="#mbcp-mp-math-utils" aria-label="Permalink to &quot;mbcp.mp_math.utils&quot;"></a></h1><p><strong>说明</strong>: 本模块定义了一些常用的工具函数</p><h3 id="func-clamp-x-float-min-float-max-float-float" tabindex="-1"><em><strong>func</strong></em> <code>clamp(x: float, min_: float, max_: float) -&gt; float</code> <a class="header-anchor" href="#func-clamp-x-float-min-float-max-float-float" aria-label="Permalink to &quot;***func*** \`clamp(x: float, min_: float, max_: float) -&gt; float\`&quot;"></a></h3><p><strong>说明</strong>: 区间限定函数</p><p><strong>参数</strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): 值</li><li>min_ (<code>float</code>): 最小值</li><li>max_ (<code>float</code>): 最大值</li></ul></blockquote><p><strong>返回</strong>: <code>float</code>: 限定在区间内的值</p><details><summary><b>源代码</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L17" 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:#6F42C1;--shiki-dark:#B392F0;"> clamp</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, min_: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, max_: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </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;"> &quot;&quot;&quot;</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>
@ -9,13 +9,13 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> \`float\`: 限定在区间内的值</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> max</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">min</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x, max_), min_)</span></span></code></pre></div></details><h3 id="class-approx" tabindex="-1"><em><strong>class</strong></em> <code>Approx</code> <a class="header-anchor" href="#class-approx" aria-label="Permalink to &quot;***class*** \`Approx\`&quot;"></a></h3><h4 id="def-init-self-value-realnumber" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, value: RealNumber)</code> <a class="header-anchor" href="#def-init-self-value-realnumber" aria-label="Permalink to &quot;***def*** \`__init__(self, value: RealNumber)\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>value (<a href="./mp_math_typing.html#realnumber"><code>RealNumber</code></a>): </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L36" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, value: RealNumber):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> max</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">min</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x, max_), min_)</span></span></code></pre></div></details><h3 id="class-approx" tabindex="-1"><em><strong>class</strong></em> <code>Approx</code> <a class="header-anchor" href="#class-approx" aria-label="Permalink to &quot;***class*** \`Approx\`&quot;"></a></h3><h4 id="func-init-self-value-realnumber" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, value: RealNumber)</code> <a class="header-anchor" href="#func-init-self-value-realnumber" aria-label="Permalink to &quot;***func*** \`__init__(self, value: RealNumber)\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>value (<a href="./mp_math_typing.html#realnumber"><code>RealNumber</code></a>): </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L36" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, value: RealNumber):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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 ([\`RealNumber\`](./mp_math_typing#realnumber)): 实数</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> value</span></span></code></pre></div></details><h4 id="def-eq-self-other" tabindex="-1"><em><strong>def</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#def-eq-self-other" aria-label="Permalink to &quot;***def*** \`__eq__(self, other)\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L44" 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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> value</span></span></code></pre></div></details><h4 id="func-eq-self-other" tabindex="-1"><em><strong>func</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#func-eq-self-other" aria-label="Permalink to &quot;***func*** \`__eq__(self, other)\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L44" 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;"> if</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value, (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">int</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)):</span></span>
<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, (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">int</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:#005CC5;--shiki-dark:#79B8FF;"> abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> APPROX</span></span>
@ -25,9 +25,9 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F
<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, (Vector3, Point3, Plane3, Line3)):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> all</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;">.value.x, other.x), approx(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value.y, other.y), approx(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value.z, other.z)])</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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.raise_type_error(other)</span></span></code></pre></div></details><h4 id="def-raise-type-error-self-other" tabindex="-1"><em><strong>def</strong></em> <code>raise_type_error(self, other)</code> <a class="header-anchor" href="#def-raise-type-error-self-other" aria-label="Permalink to &quot;***def*** \`raise_type_error(self, other)\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L56" 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:#6F42C1;--shiki-dark:#B392F0;"> raise_type_error</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> and </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-ne-self-other" tabindex="-1"><em><strong>def</strong></em> <code>__ne__(self, other)</code> <a class="header-anchor" href="#def-ne-self-other" aria-label="Permalink to &quot;***def*** \`__ne__(self, other)\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L59" 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;"> __ne__</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:#D73A49;--shiki-dark:#F97583;"> not</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">__eq__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span></span></code></pre></div></details><h3 id="def-approx-x-float-y-float-0-0-epsilon-float-approx-bool" tabindex="-1"><em><strong>def</strong></em> <code>approx(x: float, y: float = 0.0, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#def-approx-x-float-y-float-0-0-epsilon-float-approx-bool" aria-label="Permalink to &quot;***def*** \`approx(x: float, y: float = 0.0, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h3><p><strong></strong>: 0</p><p><strong></strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): 1</li><li>y (<code>float</code>): 2</li><li>epsilon (<code>float</code>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L63" 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.raise_type_error(other)</span></span></code></pre></div></details><h4 id="func-raise-type-error-self-other" tabindex="-1"><em><strong>func</strong></em> <code>raise_type_error(self, other)</code> <a class="header-anchor" href="#func-raise-type-error-self-other" aria-label="Permalink to &quot;***func*** \`raise_type_error(self, other)\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L56" 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:#6F42C1;--shiki-dark:#B392F0;"> raise_type_error</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> and </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-ne-self-other" tabindex="-1"><em><strong>func</strong></em> <code>__ne__(self, other)</code> <a class="header-anchor" href="#func-ne-self-other" aria-label="Permalink to &quot;***func*** \`__ne__(self, other)\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L59" 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;"> __ne__</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:#D73A49;--shiki-dark:#F97583;"> not</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">__eq__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span></span></code></pre></div></details><h3 id="func-approx-x-float-y-float-0-0-epsilon-float-approx-bool" tabindex="-1"><em><strong>func</strong></em> <code>approx(x: float, y: float = 0.0, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#func-approx-x-float-y-float-0-0-epsilon-float-approx-bool" aria-label="Permalink to &quot;***func*** \`approx(x: float, y: float = 0.0, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h3><p><strong></strong>: 0</p><p><strong></strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): 1</li><li>y (<code>float</code>): 2</li><li>epsilon (<code>float</code>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L63" 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 判断两个数是否近似相等或包装一个实数用于判断是否近似于0</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -37,7 +37,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https://docs.python.org/3/library/functions.html#bool): 是否近似相等</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon</span></span></code></pre></div></details><h3 id="def-sign-x-float-only-neg-bool-false-str" tabindex="-1"><em><strong>def</strong></em> <code>sign(x: float, only_neg: bool = False) -&gt; str</code> <a class="header-anchor" href="#def-sign-x-float-only-neg-bool-false-str" aria-label="Permalink to &quot;***def*** \`sign(x: float, only_neg: bool = False) -&gt; str\`&quot;"></a></h3><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li><li>only_neg (<a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#str" target="_blank" rel="noreferrer"><code>str</code></a>: + - &quot;&quot;</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L76" 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:#6F42C1;--shiki-dark:#B392F0;"> sign</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, only_neg: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">False</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</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:#005CC5;--shiki-dark:#79B8FF;"> abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon</span></span></code></pre></div></details><h3 id="func-sign-x-float-only-neg-bool-false-str" tabindex="-1"><em><strong>func</strong></em> <code>sign(x: float, only_neg: bool = False) -&gt; str</code> <a class="header-anchor" href="#func-sign-x-float-only-neg-bool-false-str" aria-label="Permalink to &quot;***func*** \`sign(x: float, only_neg: bool = False) -&gt; str\`&quot;"></a></h3><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li><li>only_neg (<a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#str" target="_blank" rel="noreferrer"><code>str</code></a>: + - &quot;&quot;</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L76" 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:#6F42C1;--shiki-dark:#B392F0;"> sign</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, only_neg: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">False</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;获取数的符号</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;"> x ([\`float\`](https://docs.python.org/3/library/functions.html#float)): 数</span></span>
@ -50,7 +50,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</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:#032F62;--shiki-dark:#9ECBFF;"> &#39;-&#39;</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;&#39;</span></span></code></pre></div></details><h3 id="def-sign-format-x-float-only-neg-bool-false-str" tabindex="-1"><em><strong>def</strong></em> <code>sign_format(x: float, only_neg: bool = False) -&gt; str</code> <a class="header-anchor" href="#def-sign-format-x-float-only-neg-bool-false-str" aria-label="Permalink to &quot;***def*** \`sign_format(x: float, only_neg: bool = False) -&gt; str\`&quot;"></a></h3><p><strong></strong>: -1 -&gt; -1 1 -&gt; +1 0 -&gt; &quot;&quot;</p><p><strong></strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li><li>only_neg (<a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#str" target="_blank" rel="noreferrer"><code>str</code></a>: + - &quot;&quot;</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L92" 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:#6F42C1;--shiki-dark:#B392F0;"> sign_format</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, only_neg: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">False</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</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:#032F62;--shiki-dark:#9ECBFF;"> &#39;&#39;</span></span></code></pre></div></details><h3 id="func-sign-format-x-float-only-neg-bool-false-str" tabindex="-1"><em><strong>func</strong></em> <code>sign_format(x: float, only_neg: bool = False) -&gt; str</code> <a class="header-anchor" href="#func-sign-format-x-float-only-neg-bool-false-str" aria-label="Permalink to &quot;***func*** \`sign_format(x: float, only_neg: bool = False) -&gt; str\`&quot;"></a></h3><p><strong></strong>: -1 -&gt; -1 1 -&gt; +1 0 -&gt; &quot;&quot;</p><p><strong></strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li><li>only_neg (<a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#str" target="_blank" rel="noreferrer"><code>str</code></a>: + - &quot;&quot;</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L92" 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:#6F42C1;--shiki-dark:#B392F0;"> sign_format</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, only_neg: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">False</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;格式化符号数</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> -1 -&gt; -1</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 1 -&gt; +1</span></span>
@ -66,4 +66,4 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</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:#D73A49;--shiki-dark:#F97583;"> f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;-</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;&#39;</span></span></code></pre></div></details>`,38),h=[l];function e(p,k,r,o,d,g){return a(),i("div",null,h)}const E=s(n,[["render",e]]);export{F as __pageData,E as default};
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;&#39;</span></span></code></pre></div></details>`,38),h=[l];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const c=s(n,[["render",p]]);export{F as __pageData,c as default};

View File

@ -1 +1 @@
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/utils.md","filePath":"zh/api/mp_math/utils.md"}'),n={name:"api/mp_math/utils.md"},l=t("",38),h=[l];function e(p,k,r,o,d,g){return a(),i("div",null,h)}const E=s(n,[["render",e]]);export{F as __pageData,E as default};
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/utils.md","filePath":"zh/api/mp_math/utils.md"}'),n={name:"api/mp_math/utils.md"},l=t("",38),h=[l];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const c=s(n,[["render",p]]);export{F as __pageData,c as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/vector.md","filePath":"zh/api/mp_math/vector.md"}'),n={name:"api/mp_math/vector.md"},e=t(`<h1 id="mbcp-mp-math-vector" tabindex="-1">mbcp.mp_math.vector <a class="header-anchor" href="#mbcp-mp-math-vector" aria-label="Permalink to &quot;mbcp.mp_math.vector&quot;"></a></h1><p><strong>说明</strong>: 本模块定义了3维向量的类Vector3以及一些常用的向量。</p><h3 id="class-vector3" tabindex="-1"><em><strong>class</strong></em> <code>Vector3</code> <a class="header-anchor" href="#class-vector3" aria-label="Permalink to &quot;***class*** \`Vector3\`&quot;"></a></h3><h4 id="def-init-self-x-float-y-float-z-float" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, x: float, y: float, z: float)</code> <a class="header-anchor" href="#def-init-self-x-float-y-float-z-float" aria-label="Permalink to &quot;***def*** \`__init__(self, x: float, y: float, z: float)\`&quot;"></a></h4><p><strong>说明</strong>: 3维向量</p><p><strong>参数</strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): x轴分量</li><li>y (<code>float</code>): y轴分量</li><li>z (<code>float</code>): z轴分量</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L18" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, z: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/vector.md","filePath":"zh/api/mp_math/vector.md"}'),n={name:"api/mp_math/vector.md"},l=t(`<h1 id="mbcp-mp-math-vector" tabindex="-1">mbcp.mp_math.vector <a class="header-anchor" href="#mbcp-mp-math-vector" aria-label="Permalink to &quot;mbcp.mp_math.vector&quot;"></a></h1><p><strong>说明</strong>: 本模块定义了3维向量的类Vector3以及一些常用的向量。</p><h3 id="class-vector3" tabindex="-1"><em><strong>class</strong></em> <code>Vector3</code> <a class="header-anchor" href="#class-vector3" aria-label="Permalink to &quot;***class*** \`Vector3\`&quot;"></a></h3><h4 id="func-init-self-x-float-y-float-z-float" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, x: float, y: float, z: float)</code> <a class="header-anchor" href="#func-init-self-x-float-y-float-z-float" aria-label="Permalink to &quot;***func*** \`__init__(self, x: float, y: float, z: float)\`&quot;"></a></h4><p><strong>说明</strong>: 3维向量</p><p><strong>参数</strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): x轴分量</li><li>y (<code>float</code>): y轴分量</li><li>z (<code>float</code>): z轴分量</li></ul></blockquote><details><summary><b>源代码</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L18" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, z: </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;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 3维向量</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -8,7 +8,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> y</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> z</span></span></code></pre></div></details><h4 id="def-approx-self-other-vector3-epsilon-float-approx-bool" tabindex="-1"><em><strong>def</strong></em> <code>approx(self, other: Vector3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#def-approx-self-other-vector3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***def*** \`approx(self, other: Vector3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.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:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> z</span></span></code></pre></div></details><h4 id="func-approx-self-other-vector3-epsilon-float-approx-bool" tabindex="-1"><em><strong>func</strong></em> <code>approx(self, other: Vector3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#func-approx-self-other-vector3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***func*** \`approx(self, other: Vector3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.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:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -18,7 +18,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否近似相等</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> all</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon])</span></span></code></pre></div></details><h4 id="def-cal-angle-self-other-vector3-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>cal_angle(self, other: Vector3) -&gt; AnyAngle</code> <a class="header-anchor" href="#def-cal-angle-self-other-vector3-anyangle" aria-label="Permalink to &quot;***def*** \`cal_angle(self, other: Vector3) -&gt; AnyAngle\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./angle.html#class-anyangle"><code>AnyAngle</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L42" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_angle</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> all</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon])</span></span></code></pre></div></details><h4 id="func-cal-angle-self-other-vector3-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>cal_angle(self, other: Vector3) -&gt; AnyAngle</code> <a class="header-anchor" href="#func-cal-angle-self-other-vector3-anyangle" aria-label="Permalink to &quot;***func*** \`cal_angle(self, other: Vector3) -&gt; AnyAngle\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./angle.html#class-anyangle"><code>AnyAngle</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L42" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_angle</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -26,7 +26,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`AnyAngle\`](./angle#class-anyangle): 夹角</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> AnyAngle(math.acos(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> @</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other </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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.length </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.length)), </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="def-cross-self-other-vector3-vector3" tabindex="-1"><em><strong>def</strong></em> <code>cross(self, other: Vector3) -&gt; Vector3</code> <a class="header-anchor" href="#def-cross-self-other-vector3-vector3" aria-label="Permalink to &quot;***def*** \`cross(self, other: Vector3) -&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: v1 cross v2 -&gt; v3</p><p>0 </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L52" 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:#6F42C1;--shiki-dark:#B392F0;"> cross</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</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(math.acos(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> @</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other </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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.length </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.length)), </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="func-cross-self-other-vector3-vector3" tabindex="-1"><em><strong>func</strong></em> <code>cross(self, other: Vector3) -&gt; Vector3</code> <a class="header-anchor" href="#func-cross-self-other-vector3-vector3" aria-label="Permalink to &quot;***func*** \`cross(self, other: Vector3) -&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: v1 cross v2 -&gt; v3</p><p>0 </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L52" 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:#6F42C1;--shiki-dark:#B392F0;"> cross</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 向量积 叉乘v1 cross v2 -&gt; v3</span></span>
<span class="line"></span>
@ -46,7 +46,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`Vector3\`](#class-vector3): 叉乘结果</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z </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;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x </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;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y </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;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x)</span></span></code></pre></div></details><h4 id="def-is-approx-parallel-self-other-vector3-epsilon-float-approx-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#def-is-approx-parallel-self-other-vector3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***def*** \`is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L76" 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:#6F42C1;--shiki-dark:#B392F0;"> is_approx_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z </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;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x </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;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y </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;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x)</span></span></code></pre></div></details><h4 id="func-is-approx-parallel-self-other-vector3-epsilon-float-approx-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#func-is-approx-parallel-self-other-vector3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***func*** \`is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L76" 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:#6F42C1;--shiki-dark:#B392F0;"> is_approx_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -55,7 +55,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否近似平行</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.cross(other).length </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon</span></span></code></pre></div></details><h4 id="def-is-parallel-self-other-vector3-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_parallel(self, other: Vector3) -&gt; bool</code> <a class="header-anchor" href="#def-is-parallel-self-other-vector3-bool" aria-label="Permalink to &quot;***def*** \`is_parallel(self, other: Vector3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L87" 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:#6F42C1;--shiki-dark:#B392F0;"> is_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.cross(other).length </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon</span></span></code></pre></div></details><h4 id="func-is-parallel-self-other-vector3-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_parallel(self, other: Vector3) -&gt; bool</code> <a class="header-anchor" href="#func-is-parallel-self-other-vector3-bool" aria-label="Permalink to &quot;***func*** \`is_parallel(self, other: Vector3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L87" 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:#6F42C1;--shiki-dark:#B392F0;"> is_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -63,7 +63,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否平行</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.cross(other).approx(zero_vector3)</span></span></code></pre></div></details><h4 id="def-normalize-self" tabindex="-1"><em><strong>def</strong></em> <code>normalize(self)</code> <a class="header-anchor" href="#def-normalize-self" aria-label="Permalink to &quot;***def*** \`normalize(self)\`&quot;"></a></h4><p><strong></strong>: </p><p></p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L97" 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:#6F42C1;--shiki-dark:#B392F0;"> normalize</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.cross(other).approx(zero_vector3)</span></span></code></pre></div></details><h4 id="func-normalize-self" tabindex="-1"><em><strong>func</strong></em> <code>normalize(self)</code> <a class="header-anchor" href="#func-normalize-self" aria-label="Permalink to &quot;***func*** \`normalize(self)\`&quot;"></a></h4><p><strong></strong>: </p><p></p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L97" 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:#6F42C1;--shiki-dark:#B392F0;"> normalize</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 将向量归一化</span></span>
<span class="line"></span>
@ -72,33 +72,33 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> length </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;">.length</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> length</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> length</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> length</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="def-np-array-self-np-ndarray" tabindex="-1"><em><strong>def</strong></em> <code>np_array(self) -&gt; np.ndarray</code> <a class="header-anchor" href="#def-np-array-self-np-ndarray" aria-label="Permalink to &quot;***def*** \`np_array(self) -&gt; np.ndarray\`&quot;"></a></h4><p><strong></strong>: <a href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html" target="_blank" rel="noreferrer"><code>np.ndarray</code></a>: numpy</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L109" 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> length</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="func-np-array-self-np-ndarray" tabindex="-1"><em><strong>func</strong></em> <code>np_array(self) -&gt; np.ndarray</code> <a class="header-anchor" href="#func-np-array-self-np-ndarray" aria-label="Permalink to &quot;***func*** \`np_array(self) -&gt; np.ndarray\`&quot;"></a></h4><p><strong></strong>: <a href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html" target="_blank" rel="noreferrer"><code>np.ndarray</code></a>: numpy</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L109" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> np_array</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;np.ndarray&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 返回numpy数组</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;"> [\`np.ndarray\`](https%3A//numpy.org/doc/stable/reference/generated/numpy.ndarray.html): numpy数组</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> np.array([</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z])</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="def-length-self-float" tabindex="-1"><em><strong>def</strong></em> <code>length(self) -&gt; float</code> <a class="header-anchor" href="#def-length-self-float" aria-label="Permalink to &quot;***def*** \`length(self) -&gt; float\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L119" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> np.array([</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z])</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="func-length-self-float" tabindex="-1"><em><strong>func</strong></em> <code>length(self) -&gt; float</code> <a class="header-anchor" href="#func-length-self-float" aria-label="Permalink to &quot;***func*** \`length(self) -&gt; float\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L119" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> length</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; </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;"> &quot;&quot;&quot;</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;"> [\`float\`](https%3A//docs.python.org/3/library/functions.html#float): 模</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> math.sqrt(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </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;">.y </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;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">**</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</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="def-unit-self-vector3" tabindex="-1"><em><strong>def</strong></em> <code>unit(self) -&gt; Vector3</code> <a class="header-anchor" href="#def-unit-self-vector3" aria-label="Permalink to &quot;***def*** \`unit(self) -&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>: <a href="#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.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:#6F42C1;--shiki-dark:#B392F0;">@</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">property</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> math.sqrt(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </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;">.y </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;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">**</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</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="func-unit-self-vector3" tabindex="-1"><em><strong>func</strong></em> <code>unit(self) -&gt; Vector3</code> <a class="header-anchor" href="#func-unit-self-vector3" aria-label="Permalink to &quot;***func*** \`unit(self) -&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>: <a href="#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.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:#6F42C1;--shiki-dark:#B392F0;">@</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">property</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> unit</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> [\`Vector3\`](#class-vector3): 单位向量</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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:#D73A49;--shiki-dark:#F97583;"> /</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.length</span></span></code></pre></div></details><h4 id="def-abs-self" tabindex="-1"><em><strong>def</strong></em> <code>__abs__(self)</code> <a class="header-anchor" href="#def-abs-self" aria-label="Permalink to &quot;***def*** \`__abs__(self)\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L136" 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;"> __abs__</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.length</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-vector3-vector3" tabindex="-1"><em><strong>def</strong></em> <code>self + other: Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-vector3-vector3" aria-label="Permalink to &quot;***def*** \`self + other: Vector3 =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L140" 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>
<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:#D73A49;--shiki-dark:#F97583;"> /</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.length</span></span></code></pre></div></details><h4 id="func-abs-self" tabindex="-1"><em><strong>func</strong></em> <code>__abs__(self)</code> <a class="header-anchor" href="#func-abs-self" aria-label="Permalink to &quot;***func*** \`__abs__(self)\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L136" 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;"> __abs__</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.length</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-vector3-vector3" tabindex="-1"><em><strong>func</strong></em> <code>self + other: Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-vector3-vector3" aria-label="Permalink to &quot;***func*** \`self + other: Vector3 =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L140" 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>
<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;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-point3-point3" tabindex="-1"><em><strong>def</strong></em> <code>self + other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#def-self-other-point3-point3" aria-label="Permalink to &quot;***def*** \`self + other: Point3 =&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L144" 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-point3-point3" tabindex="-1"><em><strong>func</strong></em> <code>self + other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#func-self-other-point3-point3" aria-label="Permalink to &quot;***func*** \`self + other: Point3 =&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L144" 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>
<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;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="def-self-other" tabindex="-1"><em><strong>def</strong></em> <code>self + other</code> <a class="header-anchor" href="#def-self-other" aria-label="Permalink to &quot;***def*** \`self + other\`&quot;"></a></h4><p><strong></strong>: V + P -&gt; P</p><p>V + V -&gt; V</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.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:#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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="func-self-other" tabindex="-1"><em><strong>func</strong></em> <code>self + other</code> <a class="header-anchor" href="#func-self-other" aria-label="Permalink to &quot;***func*** \`self + other\`&quot;"></a></h4><p><strong></strong>: V + P -&gt; P</p><p>V + V -&gt; V</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.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:#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>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> V + P -&gt; P</span></span>
<span class="line"></span>
@ -113,7 +113,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other, Point3):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for +: &#39;Vector3&#39; and &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-eq-self-other" tabindex="-1"><em><strong>def</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#def-eq-self-other" aria-label="Permalink to &quot;***def*** \`__eq__(self, other)\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L163" 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;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for +: &#39;Vector3&#39; and &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-eq-self-other" tabindex="-1"><em><strong>func</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#func-eq-self-other" aria-label="Permalink to &quot;***func*** \`__eq__(self, other)\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L163" 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:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -121,7 +121,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否相等</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.x, other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.y, other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.z, other.z)</span></span></code></pre></div></details><h4 id="def-self-other-point3-point3-1" tabindex="-1"><em><strong>def</strong></em> <code>self + other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#def-self-other-point3-point3-1" aria-label="Permalink to &quot;***def*** \`self + other: Point3 =&gt; Point3\`&quot;"></a></h4><p><strong></strong>: P + V -&gt; P</p><p></p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L173" 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;"> __radd__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</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;"> approx(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x, other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.y, other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.z, other.z)</span></span></code></pre></div></details><h4 id="func-self-other-point3-point3-1" tabindex="-1"><em><strong>func</strong></em> <code>self + other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#func-self-other-point3-point3-1" aria-label="Permalink to &quot;***func*** \`self + other: Point3 =&gt; Point3\`&quot;"></a></h4><p><strong></strong>: P + V -&gt; P</p><p></p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L173" 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;"> __radd__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> P + V -&gt; P</span></span>
<span class="line"></span>
@ -131,11 +131,11 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`Point3\`](./point#class-point3): 新的点</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-vector3-vector3-1" tabindex="-1"><em><strong>def</strong></em> <code>self - other: Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-vector3-vector3-1" aria-label="Permalink to &quot;***def*** \`self - other: Vector3 =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L185" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-vector3-vector3-1" tabindex="-1"><em><strong>func</strong></em> <code>self - other: Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-vector3-vector3-1" aria-label="Permalink to &quot;***func*** \`self - other: Vector3 =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L185" 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>
<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;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-point3-point3-2" tabindex="-1"><em><strong>def</strong></em> <code>self - other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#def-self-other-point3-point3-2" aria-label="Permalink to &quot;***def*** \`self - other: Point3 =&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L189" 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-point3-point3-2" tabindex="-1"><em><strong>func</strong></em> <code>self - other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#func-self-other-point3-point3-2" aria-label="Permalink to &quot;***func*** \`self - other: Point3 =&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L189" 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>
<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;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="def-self-other-1" tabindex="-1"><em><strong>def</strong></em> <code>self - other</code> <a class="header-anchor" href="#def-self-other-1" aria-label="Permalink to &quot;***def*** \`self - other\`&quot;"></a></h4><p><strong></strong>: V - P -&gt; P</p><p>V - V -&gt; V</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L192" 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="func-self-other-1" tabindex="-1"><em><strong>func</strong></em> <code>self - other</code> <a class="header-anchor" href="#func-self-other-1" aria-label="Permalink to &quot;***func*** \`self - other\`&quot;"></a></h4><p><strong></strong>: V - P -&gt; P</p><p>V - V -&gt; V</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L192" 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>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> V - P -&gt; P</span></span>
<span class="line"></span>
@ -150,7 +150,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other, Point3):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;unsupported operand type(s) for -: &quot;Vector3&quot; and &quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-self-other-point3" tabindex="-1"><em><strong>def</strong></em> <code>self - other: Point3</code> <a class="header-anchor" href="#def-self-other-point3" aria-label="Permalink to &quot;***def*** \`self - other: Point3\`&quot;"></a></h4><p><strong></strong>: P - V -&gt; P</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L208" 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;"> __rsub__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;unsupported operand type(s) for -: &quot;Vector3&quot; and &quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-self-other-point3" tabindex="-1"><em><strong>func</strong></em> <code>self - other: Point3</code> <a class="header-anchor" href="#func-self-other-point3" aria-label="Permalink to &quot;***func*** \`self - other: Point3\`&quot;"></a></h4><p><strong></strong>: P - V -&gt; P</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L208" 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;"> __rsub__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> P - V -&gt; P</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -161,11 +161,11 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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, Point3):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(other.x </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;">.x, other.y </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;">.y, other.z </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;">.z)</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for -: &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39; and &#39;Vector3&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-vector3-vector3-2" tabindex="-1"><em><strong>def</strong></em> <code>self * other: Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-vector3-vector3-2" aria-label="Permalink to &quot;***def*** \`self * other: Vector3 =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L223" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for -: &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39; and &#39;Vector3&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-vector3-vector3-2" tabindex="-1"><em><strong>func</strong></em> <code>self * other: Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-vector3-vector3-2" aria-label="Permalink to &quot;***func*** \`self * other: Vector3 =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L223" 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>
<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:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-realnumber-vector3" tabindex="-1"><em><strong>def</strong></em> <code>self * other: RealNumber =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-realnumber-vector3" aria-label="Permalink to &quot;***def*** \`self * other: RealNumber =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L227" 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-realnumber-vector3" tabindex="-1"><em><strong>func</strong></em> <code>self * other: RealNumber =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-realnumber-vector3" aria-label="Permalink to &quot;***func*** \`self * other: RealNumber =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L227" 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>
<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: RealNumber) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="def-self-other-int-float-vector3-vector3" tabindex="-1"><em><strong>def</strong></em> <code>self * other: int | float | Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-int-float-vector3-vector3" aria-label="Permalink to &quot;***def*** \`self * other: int | float | Vector3 =&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: 使@使cross</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a> | <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="#class-vector"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L230" 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:#032F62;--shiki-dark:#9ECBFF;">&#39;int | float | Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="func-self-other-int-float-vector3-vector3" tabindex="-1"><em><strong>func</strong></em> <code>self * other: int | float | Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-int-float-vector3-vector3" aria-label="Permalink to &quot;***func*** \`self * other: int | float | Vector3 =&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: 使@使cross</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a> | <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="#class-vector"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L230" 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:#032F62;--shiki-dark:#9ECBFF;">&#39;int | float | Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 数组运算 非点乘点乘使用@叉乘使用cross</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -178,8 +178,8 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(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:#005CC5;--shiki-dark:#79B8FF;">int</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;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other)</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for *: &#39;Vector3&#39; and &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-self-other-realnumber-vector3-1" tabindex="-1"><em><strong>def</strong></em> <code>self * other: RealNumber =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-realnumber-vector3-1" aria-label="Permalink to &quot;***def*** \`self * other: RealNumber =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L246" 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;"> __rmul__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;RealNumber&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">__mul__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span></span></code></pre></div></details><h4 id="def-self-other-vector3-realnumber" tabindex="-1"><em><strong>def</strong></em> <code>self @ other: Vector3 =&gt; RealNumber</code> <a class="header-anchor" href="#def-self-other-vector3-realnumber" aria-label="Permalink to &quot;***def*** \`self @ other: Vector3 =&gt; RealNumber\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L249" 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;"> __matmul__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;RealNumber&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for *: &#39;Vector3&#39; and &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-self-other-realnumber-vector3-1" tabindex="-1"><em><strong>func</strong></em> <code>self * other: RealNumber =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-realnumber-vector3-1" aria-label="Permalink to &quot;***func*** \`self * other: RealNumber =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L246" 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;"> __rmul__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;RealNumber&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">__mul__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span></span></code></pre></div></details><h4 id="func-self-other-vector3-realnumber" tabindex="-1"><em><strong>func</strong></em> <code>self @ other: Vector3 =&gt; RealNumber</code> <a class="header-anchor" href="#func-self-other-vector3-realnumber" aria-label="Permalink to &quot;***func*** \`self @ other: Vector3 =&gt; RealNumber\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L249" 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;"> __matmul__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;RealNumber&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -187,11 +187,11 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`float\`](https%3A//docs.python.org/3/library/functions.html#float): 点乘结果</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x </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;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y </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;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z</span></span></code></pre></div></details><h4 id="def-self-other-realnumber-vector3-2" tabindex="-1"><em><strong>def</strong></em> <code>self / other: RealNumber =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-realnumber-vector3-2" aria-label="Permalink to &quot;***def*** \`self / other: RealNumber =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L259" 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: RealNumber) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</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;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other)</span></span></code></pre></div></details><h4 id="def-self-vector3" tabindex="-1"><em><strong>def</strong></em> <code>- self =&gt; Vector3</code> <a class="header-anchor" href="#def-self-vector3" aria-label="Permalink to &quot;***def*** \`- self =&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>: <a href="#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L262" 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;"> __neg__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x </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;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y </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;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z</span></span></code></pre></div></details><h4 id="func-self-other-realnumber-vector3-2" tabindex="-1"><em><strong>func</strong></em> <code>self / other: RealNumber =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-realnumber-vector3-2" aria-label="Permalink to &quot;***func*** \`self / other: RealNumber =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L259" 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: RealNumber) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</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;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other)</span></span></code></pre></div></details><h4 id="func-self-vector3" tabindex="-1"><em><strong>func</strong></em> <code>- self =&gt; Vector3</code> <a class="header-anchor" href="#func-self-vector3" aria-label="Permalink to &quot;***func*** \`- self =&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>: <a href="#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L262" 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;"> __neg__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> [\`Vector3\`](#class-vector3): 负向量</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</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;">.x, </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;">.y, </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;">.z)</span></span></code></pre></div></details><h3 id="var-zero-vector3" tabindex="-1">var <code>zero_vector3</code> <a class="header-anchor" href="#var-zero-vector3" aria-label="Permalink to &quot;var \`zero_vector3\`&quot;"></a></h3><ul><li><p><strong></strong>: </p></li><li><p><strong></strong>: <code>Vector3</code></p></li><li><p><strong></strong>: <code>Vector3(0, 0, 0)</code></p></li></ul><h3 id="var-x-axis" tabindex="-1">var <code>x_axis</code> <a class="header-anchor" href="#var-x-axis" aria-label="Permalink to &quot;var \`x_axis\`&quot;"></a></h3><ul><li><p><strong></strong>: x</p></li><li><p><strong></strong>: <code>Vector3</code></p></li><li><p><strong></strong>: <code>Vector3(1, 0, 0)</code></p></li></ul><h3 id="var-y-axis" tabindex="-1">var <code>y_axis</code> <a class="header-anchor" href="#var-y-axis" aria-label="Permalink to &quot;var \`y_axis\`&quot;"></a></h3><ul><li><p><strong></strong>: y</p></li><li><p><strong></strong>: <code>Vector3</code></p></li><li><p><strong></strong>: <code>Vector3(0, 1, 0)</code></p></li></ul><h3 id="var-z-axis" tabindex="-1">var <code>z_axis</code> <a class="header-anchor" href="#var-z-axis" aria-label="Permalink to &quot;var \`z_axis\`&quot;"></a></h3><ul><li><p><strong></strong>: z</p></li><li><p><strong></strong>: <code>Vector3</code></p></li><li><p><strong></strong>: <code>Vector3(0, 0, 1)</code></p></li></ul>`,138),l=[e];function h(p,k,r,o,d,g){return a(),i("div",null,l)}const y=s(n,[["render",h]]);export{E as __pageData,y as default};
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</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;">.x, </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;">.y, </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;">.z)</span></span></code></pre></div></details><h3 id="var-zero-vector3" tabindex="-1">var <code>zero_vector3</code> <a class="header-anchor" href="#var-zero-vector3" aria-label="Permalink to &quot;var \`zero_vector3\`&quot;"></a></h3><ul><li><p><strong></strong>: </p></li><li><p><strong></strong>: <code>Vector3</code></p></li><li><p><strong></strong>: <code>Vector3(0, 0, 0)</code></p></li></ul><h3 id="var-x-axis" tabindex="-1">var <code>x_axis</code> <a class="header-anchor" href="#var-x-axis" aria-label="Permalink to &quot;var \`x_axis\`&quot;"></a></h3><ul><li><p><strong></strong>: x</p></li><li><p><strong></strong>: <code>Vector3</code></p></li><li><p><strong></strong>: <code>Vector3(1, 0, 0)</code></p></li></ul><h3 id="var-y-axis" tabindex="-1">var <code>y_axis</code> <a class="header-anchor" href="#var-y-axis" aria-label="Permalink to &quot;var \`y_axis\`&quot;"></a></h3><ul><li><p><strong></strong>: y</p></li><li><p><strong></strong>: <code>Vector3</code></p></li><li><p><strong></strong>: <code>Vector3(0, 1, 0)</code></p></li></ul><h3 id="var-z-axis" tabindex="-1">var <code>z_axis</code> <a class="header-anchor" href="#var-z-axis" aria-label="Permalink to &quot;var \`z_axis\`&quot;"></a></h3><ul><li><p><strong></strong>: z</p></li><li><p><strong></strong>: <code>Vector3</code></p></li><li><p><strong></strong>: <code>Vector3(0, 0, 1)</code></p></li></ul>`,138),e=[l];function h(p,k,r,o,d,c){return a(),i("div",null,e)}const y=s(n,[["render",h]]);export{E as __pageData,y as default};

View File

@ -1 +1 @@
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/vector.md","filePath":"zh/api/mp_math/vector.md"}'),n={name:"api/mp_math/vector.md"},e=t("",138),l=[e];function h(p,k,r,o,d,g){return a(),i("div",null,l)}const y=s(n,[["render",h]]);export{E as __pageData,y as default};
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector","lastUpdated":false},"headers":[],"relativePath":"api/mp_math/vector.md","filePath":"zh/api/mp_math/vector.md"}'),n={name:"api/mp_math/vector.md"},l=t("",138),e=[l];function h(p,k,r,o,d,c){return a(),i("div",null,e)}const y=s(n,[["render",h]]);export{E as __pageData,y as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"api/presets/model/index.md","filePath":"zh/api/presets/model/index.md"}'),t={name:"api/presets/model/index.md"},h=n(`<h1 id="mbcp-presets-model" tabindex="-1">mbcp.presets.model <a class="header-anchor" href="#mbcp-presets-model" aria-label="Permalink to &quot;mbcp.presets.model&quot;"></a></h1><p><strong>说明</strong>: 几何模型点集</p><h3 id="class-geometricmodels" tabindex="-1"><em><strong>class</strong></em> <code>GeometricModels</code> <a class="header-anchor" href="#class-geometricmodels" aria-label="Permalink to &quot;***class*** \`GeometricModels\`&quot;"></a></h3><p><a href="https://docs.python.org/3/library/functions.html#staticmethod" target="_blank" rel="noreferrer"><code>@staticmethod</code></a></p><h4 id="def-sphere-radius-float-density-float" tabindex="-1"><em><strong>def</strong></em> <code>sphere(radius: float, density: float)</code> <a class="header-anchor" href="#def-sphere-radius-float-density-float" aria-label="Permalink to &quot;***def*** \`sphere(radius: float, density: float)\`&quot;"></a></h4><p><strong>说明</strong>: 生成球体上的点集。</p><p><strong>参数</strong>:</p><blockquote><ul><li>radius:</li><li>density:</li></ul></blockquote><p><strong>返回</strong>: List[Point3]: 球体上的点集。</p><details><summary><b>源代码</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/presets/model/__init__.py#L12" 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;">staticmethod</span></span>
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"api/presets/model/index.md","filePath":"zh/api/presets/model/index.md"}'),t={name:"api/presets/model/index.md"},h=n(`<h1 id="mbcp-presets-model" tabindex="-1">mbcp.presets.model <a class="header-anchor" href="#mbcp-presets-model" aria-label="Permalink to &quot;mbcp.presets.model&quot;"></a></h1><p><strong>说明</strong>: 几何模型点集</p><h3 id="class-geometricmodels" tabindex="-1"><em><strong>class</strong></em> <code>GeometricModels</code> <a class="header-anchor" href="#class-geometricmodels" aria-label="Permalink to &quot;***class*** \`GeometricModels\`&quot;"></a></h3><p><a href="https://docs.python.org/3/library/functions.html#staticmethod" target="_blank" rel="noreferrer"><code>@staticmethod</code></a></p><h4 id="func-sphere-radius-float-density-float" tabindex="-1"><em><strong>func</strong></em> <code>sphere(radius: float, density: float)</code> <a class="header-anchor" href="#func-sphere-radius-float-density-float" aria-label="Permalink to &quot;***func*** \`sphere(radius: float, density: float)\`&quot;"></a></h4><p><strong>说明</strong>: 生成球体上的点集。</p><p><strong>参数</strong>:</p><blockquote><ul><li>radius:</li><li>density:</li></ul></blockquote><p><strong>返回</strong>: List[Point3]: 球体上的点集。</p><details><summary><b>源代码</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/presets/model/__init__.py#L12" 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;">staticmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> sphere</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(radius: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, density: </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;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 生成球体上的点集</span></span>

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"api/presets/model/model.md","filePath":"zh/api/presets/model/model.md"}'),n={name:"api/presets/model/model.md"},h=t(`<h1 id="mbcp-presets-model" tabindex="-1">mbcp.presets.model <a class="header-anchor" href="#mbcp-presets-model" aria-label="Permalink to &quot;mbcp.presets.model&quot;"></a></h1><p><strong>说明</strong>: 几何模型点集</p><h3 id="class-geometricmodels" tabindex="-1"><em><strong>class</strong></em> <code>GeometricModels</code> <a class="header-anchor" href="#class-geometricmodels" aria-label="Permalink to &quot;***class*** \`GeometricModels\`&quot;"></a></h3><p><a href="https://docs.python.org/3/library/functions.html#staticmethod" target="_blank" rel="noreferrer"><code>@staticmethod</code></a></p><h4 id="def-sphere-radius-float-density-float" tabindex="-1"><em><strong>def</strong></em> <code>sphere(radius: float, density: float)</code> <a class="header-anchor" href="#def-sphere-radius-float-density-float" aria-label="Permalink to &quot;***def*** \`sphere(radius: float, density: float)\`&quot;"></a></h4><p><strong>说明</strong>: 生成球体上的点集。</p><p><strong>参数</strong>:</p><blockquote><ul><li>radius:</li><li>density:</li></ul></blockquote><p><strong>返回</strong>: List[Point3]: 球体上的点集。</p><details><summary><b>源代码</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/presets/model/__init__.py#L12" 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;">staticmethod</span></span>
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"api/presets/model/model.md","filePath":"zh/api/presets/model/model.md"}'),t={name:"api/presets/model/model.md"},h=n(`<h1 id="mbcp-presets-model" tabindex="-1">mbcp.presets.model <a class="header-anchor" href="#mbcp-presets-model" aria-label="Permalink to &quot;mbcp.presets.model&quot;"></a></h1><p><strong>说明</strong>: 几何模型点集</p><h3 id="class-geometricmodels" tabindex="-1"><em><strong>class</strong></em> <code>GeometricModels</code> <a class="header-anchor" href="#class-geometricmodels" aria-label="Permalink to &quot;***class*** \`GeometricModels\`&quot;"></a></h3><p><a href="https://docs.python.org/3/library/functions.html#staticmethod" target="_blank" rel="noreferrer"><code>@staticmethod</code></a></p><h4 id="func-sphere-radius-float-density-float" tabindex="-1"><em><strong>func</strong></em> <code>sphere(radius: float, density: float)</code> <a class="header-anchor" href="#func-sphere-radius-float-density-float" aria-label="Permalink to &quot;***func*** \`sphere(radius: float, density: float)\`&quot;"></a></h4><p><strong>说明</strong>: 生成球体上的点集。</p><p><strong>参数</strong>:</p><blockquote><ul><li>radius:</li><li>density:</li></ul></blockquote><p><strong>返回</strong>: List[Point3]: 球体上的点集。</p><details><summary><b>源代码</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/presets/model/__init__.py#L12" 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;">staticmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> sphere</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(radius: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, density: </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;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 生成球体上的点集</span></span>
@ -15,4 +15,4 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x_array </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> radius </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> np.sin(phi_list) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> np.cos(theta_list)</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> y_array </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> radius </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> np.sin(phi_list) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> np.sin(theta_list)</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> z_array </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> radius </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> np.cos(phi_list)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [Point3(x_array[i], y_array[i], z_array[i]) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">for</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> i </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">in</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> range</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(num)]</span></span></code></pre></div></details>`,10),l=[h];function p(k,e,r,d,E,o){return a(),i("div",null,l)}const c=s(n,[["render",p]]);export{y as __pageData,c as default};
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [Point3(x_array[i], y_array[i], z_array[i]) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">for</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> i </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">in</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> range</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(num)]</span></span></code></pre></div></details>`,10),l=[h];function p(k,e,r,d,E,o){return a(),i("div",null,l)}const c=s(t,[["render",p]]);export{y as __pageData,c as default};

View File

@ -1 +1 @@
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"api/presets/model/model.md","filePath":"zh/api/presets/model/model.md"}'),n={name:"api/presets/model/model.md"},h=t("",10),l=[h];function p(k,e,r,d,E,o){return a(),i("div",null,l)}const c=s(n,[["render",p]]);export{y as __pageData,c as default};
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"api/presets/model/model.md","filePath":"zh/api/presets/model/model.md"}'),t={name:"api/presets/model/model.md"},h=n("",10),l=[h];function p(k,e,r,d,E,o){return a(),i("div",null,l)}const c=s(t,[["render",p]]);export{y as __pageData,c as default};

View File

@ -1 +1 @@
import{t as p}from"./chunks/theme.BIB25x10.js";import{U as o,a5 as u,a6 as c,a7 as l,a8 as f,a9 as d,aa as m,ab as h,ac as g,ad as A,ae as y,d as P,u as v,y as C,x as b,af as w,ag as E,ah as R,ai as S}from"./chunks/framework.DpC1ZpOZ.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(p),T=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=v();return C(()=>{b(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&w(),E(),R(),s.setup&&s.setup(),()=>S(s.Layout)}});async function x(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(c,e);const t=l(e.route);return a.provide(f,t),a.component("Content",d),a.component("ClientOnly",m),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:h}),{app:a,router:e,data:t}}function D(){return g(T)}function _(){let e=o,a;return A(t=>{let n=y(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=import(n)),o&&(e=!1),r},s.NotFound)}o&&x().then(({app:e,router:a,data:t})=>{a.go().then(()=>{u(a.route,t.site),e.mount("#app")})});export{x as createApp};
import{t as p}from"./chunks/theme.BhGtk3iD.js";import{U as o,a5 as u,a6 as c,a7 as l,a8 as f,a9 as d,aa as m,ab as h,ac as g,ad as A,ae as y,d as P,u as v,y as C,x as b,af as w,ag as E,ah as R,ai as S}from"./chunks/framework.DpC1ZpOZ.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(p),T=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=v();return C(()=>{b(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&w(),E(),R(),s.setup&&s.setup(),()=>S(s.Layout)}});async function x(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(c,e);const t=l(e.route);return a.provide(f,t),a.component("Content",d),a.component("ClientOnly",m),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:h}),{app:a,router:e,data:t}}function D(){return g(T)}function _(){let e=o,a;return A(t=>{let n=y(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=import(n)),o&&(e=!1),r},s.NotFound)}o&&x().then(({app:e,router:a,data:t})=>{a.go().then(()=>{u(a.route,t.site),e.mount("#app")})});export{x as createApp};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
import{_ as s,c as a,o as i,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/angle.md","filePath":"ja/api/mp_math/angle.md"}'),t={name:"ja/api/mp_math/angle.md"},e=n(`<h1 id="mbcp-mp-math-angle" tabindex="-1">mbcp.mp_math.angle <a class="header-anchor" href="#mbcp-mp-math-angle" aria-label="Permalink to &quot;mbcp.mp_math.angle&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了角度相关的类</p><h3 id="class-angle" tabindex="-1"><em><strong>class</strong></em> <code>Angle</code> <a class="header-anchor" href="#class-angle" aria-label="Permalink to &quot;***class*** \`Angle\`&quot;"></a></h3><h3 id="class-anyangle-angle" tabindex="-1"><em><strong>class</strong></em> <code>AnyAngle(Angle)</code> <a class="header-anchor" href="#class-anyangle-angle" aria-label="Permalink to &quot;***class*** \`AnyAngle(Angle)\`&quot;"></a></h3><h4 id="def-init-self-value-float-is-radian-bool-false" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, value: float, is_radian: bool = False)</code> <a class="header-anchor" href="#def-init-self-value-float-is-radian-bool-false" aria-label="Permalink to &quot;***def*** \`__init__(self, value: float, is_radian: bool = False)\`&quot;"></a></h4><p><strong>説明</strong>: 任意角度。</p><p><strong>引数</strong>:</p><blockquote><ul><li>value: 角度或弧度值</li><li>is_radian: 是否为弧度,默认为否</li></ul></blockquote><details><summary><b>ソースコード</b> または <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L17" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, value: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, is_radian: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">False</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/angle.md","filePath":"en/api/mp_math/angle.md"}'),t={name:"en/api/mp_math/angle.md"},e=n(`<h1 id="mbcp-mp-math-angle" tabindex="-1">mbcp.mp_math.angle <a class="header-anchor" href="#mbcp-mp-math-angle" aria-label="Permalink to &quot;mbcp.mp_math.angle&quot;"></a></h1><p><strong>Description</strong>: 本模块定义了角度相关的类</p><h3 id="class-angle" tabindex="-1"><em><strong>class</strong></em> <code>Angle</code> <a class="header-anchor" href="#class-angle" aria-label="Permalink to &quot;***class*** \`Angle\`&quot;"></a></h3><h3 id="class-anyangle-angle" tabindex="-1"><em><strong>class</strong></em> <code>AnyAngle(Angle)</code> <a class="header-anchor" href="#class-anyangle-angle" aria-label="Permalink to &quot;***class*** \`AnyAngle(Angle)\`&quot;"></a></h3><h4 id="func-init-self-value-float-is-radian-bool-false" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, value: float, is_radian: bool = False)</code> <a class="header-anchor" href="#func-init-self-value-float-is-radian-bool-false" aria-label="Permalink to &quot;***func*** \`__init__(self, value: float, is_radian: bool = False)\`&quot;"></a></h4><p><strong>Description</strong>: 任意角度。</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>value: 角度或弧度值</li><li>is_radian: 是否为弧度,默认为否</li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L17" target="_blank">View on 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, value: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, is_radian: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">False</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -8,92 +8,92 @@ import{_ as s,c as a,o as i,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c
<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>
<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="def-complementary-self-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>complementary(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#def-complementary-self-anyangle" aria-label="Permalink to &quot;***def*** \`complementary(self) -&gt; AnyAngle\`&quot;"></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>
<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="func-complementary-self-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>complementary(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#func-complementary-self-anyangle" aria-label="Permalink to &quot;***func*** \`complementary(self) -&gt; AnyAngle\`&quot;"></a></h4><p><strong>Description</strong>: 90°</p><p><strong>Return</strong>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L30" target="_blank">View on 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>
<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) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</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;">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="def-supplementary-self-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>supplementary(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#def-supplementary-self-anyangle" aria-label="Permalink to &quot;***def*** \`supplementary(self) -&gt; AnyAngle\`&quot;"></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>
<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="func-supplementary-self-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>supplementary(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#func-supplementary-self-anyangle" aria-label="Permalink to &quot;***func*** \`supplementary(self) -&gt; AnyAngle\`&quot;"></a></h4><p><strong>Description</strong>: 180°</p><p><strong>Return</strong>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L39" target="_blank">View on 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>
<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) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</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;">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="def-degree-self-float" tabindex="-1"><em><strong>def</strong></em> <code>degree(self) -&gt; float</code> <a class="header-anchor" href="#def-degree-self-float" aria-label="Permalink to &quot;***def*** \`degree(self) -&gt; float\`&quot;"></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>
<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="func-degree-self-float" tabindex="-1"><em><strong>func</strong></em> <code>degree(self) -&gt; float</code> <a class="header-anchor" href="#func-degree-self-float" aria-label="Permalink to &quot;***func*** \`degree(self) -&gt; float\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Return</strong>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L48" target="_blank">View on 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>
<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) -&gt; </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;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</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:#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="def-minimum-positive-self-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>minimum_positive(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#def-minimum-positive-self-anyangle" aria-label="Permalink to &quot;***def*** \`minimum_positive(self) -&gt; AnyAngle\`&quot;"></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>
<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="func-minimum-positive-self-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>minimum_positive(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#func-minimum-positive-self-anyangle" aria-label="Permalink to &quot;***func*** \`minimum_positive(self) -&gt; AnyAngle\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Return</strong>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L57" target="_blank">View on 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>
<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) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</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;"> (</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="def-maximum-negative-self-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>maximum_negative(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#def-maximum-negative-self-anyangle" aria-label="Permalink to &quot;***def*** \`maximum_negative(self) -&gt; AnyAngle\`&quot;"></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>
<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="func-maximum-negative-self-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>maximum_negative(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#func-maximum-negative-self-anyangle" aria-label="Permalink to &quot;***func*** \`maximum_negative(self) -&gt; AnyAngle\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Return</strong>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L66" target="_blank">View on 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>
<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) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</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:#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="def-sin-self-float" tabindex="-1"><em><strong>def</strong></em> <code>sin(self) -&gt; float</code> <a class="header-anchor" href="#def-sin-self-float" aria-label="Permalink to &quot;***def*** \`sin(self) -&gt; float\`&quot;"></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>
<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="func-sin-self-float" tabindex="-1"><em><strong>func</strong></em> <code>sin(self) -&gt; float</code> <a class="header-anchor" href="#func-sin-self-float" aria-label="Permalink to &quot;***func*** \`sin(self) -&gt; float\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Return</strong>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L75" target="_blank">View on 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>
<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) -&gt; </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;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</span></span>
<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="def-cos-self-float" tabindex="-1"><em><strong>def</strong></em> <code>cos(self) -&gt; float</code> <a class="header-anchor" href="#def-cos-self-float" aria-label="Permalink to &quot;***def*** \`cos(self) -&gt; float\`&quot;"></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>
<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="func-cos-self-float" tabindex="-1"><em><strong>func</strong></em> <code>cos(self) -&gt; float</code> <a class="header-anchor" href="#func-cos-self-float" aria-label="Permalink to &quot;***func*** \`cos(self) -&gt; float\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Return</strong>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L84" target="_blank">View on 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>
<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) -&gt; </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;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</span></span>
<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="def-tan-self-float" tabindex="-1"><em><strong>def</strong></em> <code>tan(self) -&gt; float</code> <a class="header-anchor" href="#def-tan-self-float" aria-label="Permalink to &quot;***def*** \`tan(self) -&gt; float\`&quot;"></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>
<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="func-tan-self-float" tabindex="-1"><em><strong>func</strong></em> <code>tan(self) -&gt; float</code> <a class="header-anchor" href="#func-tan-self-float" aria-label="Permalink to &quot;***func*** \`tan(self) -&gt; float\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Return</strong>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L93" target="_blank">View on 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>
<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) -&gt; </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;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</span></span>
<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="def-cot-self-float" tabindex="-1"><em><strong>def</strong></em> <code>cot(self) -&gt; float</code> <a class="header-anchor" href="#def-cot-self-float" aria-label="Permalink to &quot;***def*** \`cot(self) -&gt; float\`&quot;"></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>
<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="func-cot-self-float" tabindex="-1"><em><strong>func</strong></em> <code>cot(self) -&gt; float</code> <a class="header-anchor" href="#func-cot-self-float" aria-label="Permalink to &quot;***func*** \`cot(self) -&gt; float\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Return</strong>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L102" target="_blank">View on 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>
<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) -&gt; </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;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</span></span>
<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="def-sec-self-float" tabindex="-1"><em><strong>def</strong></em> <code>sec(self) -&gt; float</code> <a class="header-anchor" href="#def-sec-self-float" aria-label="Permalink to &quot;***def*** \`sec(self) -&gt; float\`&quot;"></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>
<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="func-sec-self-float" tabindex="-1"><em><strong>func</strong></em> <code>sec(self) -&gt; float</code> <a class="header-anchor" href="#func-sec-self-float" aria-label="Permalink to &quot;***func*** \`sec(self) -&gt; float\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Return</strong>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L111" target="_blank">View on 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>
<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) -&gt; </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;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</span></span>
<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="def-csc-self-float" tabindex="-1"><em><strong>def</strong></em> <code>csc(self) -&gt; float</code> <a class="header-anchor" href="#def-csc-self-float" aria-label="Permalink to &quot;***def*** \`csc(self) -&gt; float\`&quot;"></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>
<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="func-csc-self-float" tabindex="-1"><em><strong>func</strong></em> <code>csc(self) -&gt; float</code> <a class="header-anchor" href="#func-csc-self-float" aria-label="Permalink to &quot;***func*** \`csc(self) -&gt; float\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Return</strong>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L120" target="_blank">View on 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>
<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) -&gt; </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;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</span></span>
<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="def-self-other-anyangle-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>self + other: AnyAngle =&gt; AnyAngle</code> <a class="header-anchor" href="#def-self-other-anyangle-anyangle" aria-label="Permalink to &quot;***def*** \`self + other: AnyAngle =&gt; AnyAngle\`&quot;"></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;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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="def-eq-self-other" tabindex="-1"><em><strong>def</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#def-eq-self-other" aria-label="Permalink to &quot;***def*** \`__eq__(self, other)\`&quot;"></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="def-self-other-anyangle-anyangle-1" tabindex="-1"><em><strong>def</strong></em> <code>self - other: AnyAngle =&gt; AnyAngle</code> <a class="header-anchor" href="#def-self-other-anyangle-anyangle-1" aria-label="Permalink to &quot;***def*** \`self - other: AnyAngle =&gt; AnyAngle\`&quot;"></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;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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="def-self-other-float-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>self * other: float =&gt; AnyAngle</code> <a class="header-anchor" href="#def-self-other-float-anyangle" aria-label="Permalink to &quot;***def*** \`self * other: float =&gt; AnyAngle\`&quot;"></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;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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="def-self-other-float-anyangle-1" tabindex="-1"><em><strong>def</strong></em> <code>self / other: float =&gt; AnyAngle</code> <a class="header-anchor" href="#def-self-other-float-anyangle-1" aria-label="Permalink to &quot;***def*** \`self / other: float =&gt; AnyAngle\`&quot;"></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>
<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="func-self-other-anyangle-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>self + other: AnyAngle =&gt; AnyAngle</code> <a class="header-anchor" href="#func-self-other-anyangle-anyangle" aria-label="Permalink to &quot;***func*** \`self + other: AnyAngle =&gt; AnyAngle\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L128" target="_blank">View on 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;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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="func-eq-self-other" tabindex="-1"><em><strong>func</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#func-eq-self-other" aria-label="Permalink to &quot;***func*** \`__eq__(self, other)\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L131" target="_blank">View on 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="func-self-other-anyangle-anyangle-1" tabindex="-1"><em><strong>func</strong></em> <code>self - other: AnyAngle =&gt; AnyAngle</code> <a class="header-anchor" href="#func-self-other-anyangle-anyangle-1" aria-label="Permalink to &quot;***func*** \`self - other: AnyAngle =&gt; AnyAngle\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L134" target="_blank">View on 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;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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="func-self-other-float-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>self * other: float =&gt; AnyAngle</code> <a class="header-anchor" href="#func-self-other-float-anyangle" aria-label="Permalink to &quot;***func*** \`self * other: float =&gt; AnyAngle\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L137" target="_blank">View on 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;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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="func-self-other-float-anyangle-1" tabindex="-1"><em><strong>func</strong></em> <code>self / other: float =&gt; AnyAngle</code> <a class="header-anchor" href="#func-self-other-float-anyangle-1" aria-label="Permalink to &quot;***func*** \`self / other: float =&gt; AnyAngle\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L147" target="_blank">View on 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>
<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;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-anyangle-float" tabindex="-1"><em><strong>def</strong></em> <code>self / other: AnyAngle =&gt; float</code> <a class="header-anchor" href="#def-self-other-anyangle-float" aria-label="Permalink to &quot;***def*** \`self / other: AnyAngle =&gt; float\`&quot;"></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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-anyangle-float" tabindex="-1"><em><strong>func</strong></em> <code>self / other: AnyAngle =&gt; float</code> <a class="header-anchor" href="#func-self-other-anyangle-float" aria-label="Permalink to &quot;***func*** \`self / other: AnyAngle =&gt; float\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L151" target="_blank">View on 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>
<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;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </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:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="def-self-other" tabindex="-1"><em><strong>def</strong></em> <code>self / other</code> <a class="header-anchor" href="#def-self-other" aria-label="Permalink to &quot;***def*** \`self / other\`&quot;"></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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="func-self-other" tabindex="-1"><em><strong>func</strong></em> <code>self / other</code> <a class="header-anchor" href="#func-self-other" aria-label="Permalink to &quot;***func*** \`self / other\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L154" target="_blank">View on 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>
<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>`,80),l=[e];function h(p,k,r,d,o,g){return i(),a("div",null,l)}const F=s(t,[["render",h]]);export{c as __pageData,F as default};
<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>`,80),l=[e];function h(p,k,r,o,d,g){return a(),i("div",null,l)}const F=s(t,[["render",h]]);export{y as __pageData,F as default};

View File

@ -1 +1 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/angle.md","filePath":"en/api/mp_math/angle.md"}'),t={name:"en/api/mp_math/angle.md"},e=n("",80),l=[e];function h(p,k,r,o,d,g){return a(),i("div",null,l)}const F=s(t,[["render",h]]);export{c as __pageData,F as default};
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/angle.md","filePath":"en/api/mp_math/angle.md"}'),t={name:"en/api/mp_math/angle.md"},e=n("",80),l=[e];function h(p,k,r,o,d,g){return a(),i("div",null,l)}const F=s(t,[["render",h]]);export{y as __pageData,F as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation","lastUpdated":false},"headers":[],"relativePath":"zht/api/mp_math/equation.md","filePath":"zht/api/mp_math/equation.md"}'),t={name:"zht/api/mp_math/equation.md"},l=n(`<h1 id="mbcp-mp-math-equation" tabindex="-1">mbcp.mp_math.equation <a class="header-anchor" href="#mbcp-mp-math-equation" aria-label="Permalink to &quot;mbcp.mp_math.equation&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了方程相关的类和函数以及一些常用的数学函数</p><h3 id="class-curveequation" tabindex="-1"><em><strong>class</strong></em> <code>CurveEquation</code> <a class="header-anchor" href="#class-curveequation" aria-label="Permalink to &quot;***class*** \`CurveEquation\`&quot;"></a></h3><h4 id="def-init-self-x-func-onevarfunc-y-func-onevarfunc-z-func-onevarfunc" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)</code> <a class="header-anchor" href="#def-init-self-x-func-onevarfunc-y-func-onevarfunc-z-func-onevarfunc" aria-label="Permalink to &quot;***def*** \`__init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)\`&quot;"></a></h4><p><strong>説明</strong>: 曲线方程。</p><p><strong>變數説明</strong>:</p><blockquote><ul><li>x_func (<a href="./mp_math_typing.html#var-onevarfunc"><code>OneVarFunc</code></a>): x函数</li><li>y_func (<a href="./mp_math_typing.html#var-onevarfunc"><code>OneVarFunc</code></a>): y函数</li><li>z_func (<a href="./mp_math_typing.html#var-onevarfunc"><code>OneVarFunc</code></a>): z函数</li></ul></blockquote><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/equation.py#L12" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):</span></span>
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/equation.md","filePath":"en/api/mp_math/equation.md"}'),t={name:"en/api/mp_math/equation.md"},l=n(`<h1 id="mbcp-mp-math-equation" tabindex="-1">mbcp.mp_math.equation <a class="header-anchor" href="#mbcp-mp-math-equation" aria-label="Permalink to &quot;mbcp.mp_math.equation&quot;"></a></h1><p><strong>Description</strong>: 本模块定义了方程相关的类和函数以及一些常用的数学函数</p><h3 id="class-curveequation" tabindex="-1"><em><strong>class</strong></em> <code>CurveEquation</code> <a class="header-anchor" href="#class-curveequation" aria-label="Permalink to &quot;***class*** \`CurveEquation\`&quot;"></a></h3><h4 id="func-init-self-x-func-onevarfunc-y-func-onevarfunc-z-func-onevarfunc" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)</code> <a class="header-anchor" href="#func-init-self-x-func-onevarfunc-y-func-onevarfunc-z-func-onevarfunc" aria-label="Permalink to &quot;***func*** \`__init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)\`&quot;"></a></h4><p><strong>Description</strong>: 曲线方程。</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>x_func (<a href="./mp_math_typing.html#var-onevarfunc"><code>OneVarFunc</code></a>): x函数</li><li>y_func (<a href="./mp_math_typing.html#var-onevarfunc"><code>OneVarFunc</code></a>): y函数</li><li>z_func (<a href="./mp_math_typing.html#var-onevarfunc"><code>OneVarFunc</code></a>): z函数</li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/equation.py#L12" target="_blank">View on 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -8,7 +8,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const u
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x_func </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x_func</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y_func </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> y_func</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z_func </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> z_func</span></span></code></pre></div></details><h4 id="def-call-self-t-var-point3-tuple-point3" tabindex="-1"><em><strong>def</strong></em> <code>__call__(self, *t: Var) -&gt; Point3 | tuple[Point3, ...]</code> <a class="header-anchor" href="#def-call-self-t-var-point3-tuple-point3" aria-label="Permalink to &quot;***def*** \`__call__(self, *t: Var) -&gt; Point3 | tuple[Point3, ...]\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>*t:</li><li>:</li></ul></blockquote><p><strong></strong>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/equation.py#L24" 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;"> __call__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t: Var) -&gt; Point3 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tuple[Point3, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z_func </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> z_func</span></span></code></pre></div></details><h4 id="func-call-self-t-var-point3-tuple-point3" tabindex="-1"><em><strong>func</strong></em> <code>__call__(self, *t: Var) -&gt; Point3 | tuple[Point3, ...]</code> <a class="header-anchor" href="#func-call-self-t-var-point3-tuple-point3" aria-label="Permalink to &quot;***func*** \`__call__(self, *t: Var) -&gt; Point3 | tuple[Point3, ...]\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>*t:</li><li>:</li></ul></blockquote><p><strong>Return</strong>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/equation.py#L24" target="_blank">View on 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;"> __call__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t: Var) -&gt; Point3 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tuple[Point3, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -20,7 +20,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const u
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> len</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(t) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1</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;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x_func(t[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]), </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y_func(t[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]), </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z_func(t[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]))</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> tuple</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([Point3(x, y, z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">for</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x, y, z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">in</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> zip</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x_func(t), </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y_func(t), </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z_func(t))])</span></span></code></pre></div></details><h3 id="def-get-partial-derivative-func-func-multivarsfunc-var-int-tuple-int-epsilon-number-epsilon-multivarsfunc" tabindex="-1"><em><strong>def</strong></em> <code>get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -&gt; MultiVarsFunc</code> <a class="header-anchor" href="#def-get-partial-derivative-func-func-multivarsfunc-var-int-tuple-int-epsilon-number-epsilon-multivarsfunc" aria-label="Permalink to &quot;***def*** \`get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -&gt; MultiVarsFunc\`&quot;"></a></h3><p><strong></strong>: N</p><div class="warning custom-block github-alert"><p class="custom-block-title">WARNING</p><p></p></div><p><strong></strong>:</p><blockquote><ul><li>func (<a href="./mp_math_typing.html#var-multivarsfunc"><code>MultiVarsFunc</code></a>): N</li><li>var: ()()</li><li>epsilon: </li></ul></blockquote><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>ValueError </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/equation.py#L42" 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:#6F42C1;--shiki-dark:#B392F0;"> get_partial_derivative_func</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(func: MultiVarsFunc, var: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">int</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tuple[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">int</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">], epsilon: Number</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">EPSILON</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; MultiVarsFunc:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> tuple</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([Point3(x, y, z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">for</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x, y, z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">in</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> zip</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x_func(t), </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y_func(t), </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z_func(t))])</span></span></code></pre></div></details><h3 id="func-get-partial-derivative-func-func-multivarsfunc-var-int-tuple-int-epsilon-number-epsilon-multivarsfunc" tabindex="-1"><em><strong>func</strong></em> <code>get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -&gt; MultiVarsFunc</code> <a class="header-anchor" href="#func-get-partial-derivative-func-func-multivarsfunc-var-int-tuple-int-epsilon-number-epsilon-multivarsfunc" aria-label="Permalink to &quot;***func*** \`get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -&gt; MultiVarsFunc\`&quot;"></a></h3><p><strong>Description</strong>: N</p><div class="warning custom-block github-alert"><p class="custom-block-title">WARNING</p><p></p></div><p><strong>Arguments</strong>:</p><blockquote><ul><li>func (<a href="./mp_math_typing.html#var-multivarsfunc"><code>MultiVarsFunc</code></a>): N</li><li>var: ()()</li><li>epsilon: </li></ul></blockquote><p><strong>Return</strong>: </p><p><strong>Raises</strong>:</p><blockquote><ul><li>ValueError </li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/equation.py#L42" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> get_partial_derivative_func</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(func: MultiVarsFunc, var: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">int</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tuple[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">int</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">], epsilon: Number</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">EPSILON</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; MultiVarsFunc:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 求N元函数一阶偏导函数这玩意不太稳定慎用</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &gt; [!warning]</span></span>
@ -62,4 +62,4 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const u
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> result_func(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">args)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> high_order_partial_derivative_func</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ValueError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Invalid var type&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details>`,23),p=[l];function h(e,k,r,E,d,g){return a(),i("div",null,p)}const F=s(t,[["render",h]]);export{u as __pageData,F as default};
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ValueError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Invalid var type&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details>`,23),p=[l];function h(e,k,r,E,c,d){return a(),i("div",null,p)}const o=s(t,[["render",h]]);export{u as __pageData,o as default};

View File

@ -1 +1 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/equation.md","filePath":"en/api/mp_math/equation.md"}'),t={name:"en/api/mp_math/equation.md"},l=n("",23),p=[l];function h(e,k,r,E,d,c){return a(),i("div",null,p)}const o=s(t,[["render",h]]);export{u as __pageData,o as default};
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/equation.md","filePath":"en/api/mp_math/equation.md"}'),t={name:"en/api/mp_math/equation.md"},l=n("",23),p=[l];function h(e,k,r,E,c,d){return a(),i("div",null,p)}const o=s(t,[["render",h]]);export{u as __pageData,o as default};

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{_ as l,c as t,j as s,a as n,a4 as a,o as i}from"./chunks/framework.DpC1ZpOZ.js";const V=JSON.parse('{"title":"mbcp.mp_math.function","description":"","frontmatter":{"title":"mbcp.mp_math.function","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/function.md","filePath":"en/api/mp_math/function.md"}'),e={name:"en/api/mp_math/function.md"},Q=a("",4),T={class:"tip custom-block github-alert"},h=s("p",{class:"custom-block-title"},"TIP",-1),p={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},r={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"8.471ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 3744.3 1000","aria-hidden":"true"},d=a("",1),o=[d],k=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mi",null,"f"),s("mo",{stretchy:"false"},"("),s("mi",null,"x"),s("mo",null,","),s("mi",null,"y"),s("mo",null,","),s("mi",null,"z"),s("mo",{stretchy:"false"},")")])],-1),m={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},g={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"10.19ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 4504 1000","aria-hidden":"true"},c=a("",1),y=[c],u=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mo",{stretchy:"false"},"("),s("msub",null,[s("mi",null,"x"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"y"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"z"),s("mn",null,"0")]),s("mo",{stretchy:"false"},")")])],-1),E={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},F={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-1.469ex"},xmlns:"http://www.w3.org/2000/svg",width:"29.427ex",height:"4.07ex",role:"img",focusable:"false",viewBox:"0 -1149.5 13006.8 1799","aria-hidden":"true"},f=a("",1),_=[f],C=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mi",{mathvariant:"normal"},"∇"),s("mi",null,"f"),s("mo",{stretchy:"false"},"("),s("msub",null,[s("mi",null,"x"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"y"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"z"),s("mn",null,"0")]),s("mo",{stretchy:"false"},")"),s("mo",null,"="),s("mrow",{"data-mjx-texclass":"INNER"},[s("mo",{"data-mjx-texclass":"OPEN"},"("),s("mfrac",null,[s("mrow",null,[s("mi",null,"∂"),s("mi",null,"f")]),s("mrow",null,[s("mi",null,"∂"),s("mi",null,"x")])]),s("mo",null,","),s("mfrac",null,[s("mrow",null,[s("mi",null,"∂"),s("mi",null,"f")]),s("mrow",null,[s("mi",null,"∂"),s("mi",null,"y")])]),s("mo",null,","),s("mfrac",null,[s("mrow",null,[s("mi",null,"∂"),s("mi",null,"f")]),s("mrow",null,[s("mi",null,"∂"),s("mi",null,"z")])]),s("mo",{"data-mjx-texclass":"CLOSE"},")")])])],-1),w=a("",13);function x(b,L,H,M,B,v){return i(),t("div",null,[Q,s("div",T,[h,s("p",null,[n("已知一个函数"),s("mjx-container",p,[(i(),t("svg",r,o)),k]),n(",则其在点"),s("mjx-container",m,[(i(),t("svg",g,y)),u]),n("处的梯度向量为: "),s("mjx-container",E,[(i(),t("svg",F,_)),C])])]),w])}const Z=l(e,[["render",x]]);export{V as __pageData,Z as default};
import{_ as l,c as t,j as s,a as n,a4 as a,o as i}from"./chunks/framework.DpC1ZpOZ.js";const V=JSON.parse('{"title":"mbcp.mp_math.function","description":"","frontmatter":{"title":"mbcp.mp_math.function","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/function.md","filePath":"en/api/mp_math/function.md"}'),e={name:"en/api/mp_math/function.md"},Q=a("",4),T={class:"tip custom-block github-alert"},h=s("p",{class:"custom-block-title"},"TIP",-1),p={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},r={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"8.471ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 3744.3 1000","aria-hidden":"true"},d=a("",1),o=[d],k=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mi",null,"f"),s("mo",{stretchy:"false"},"("),s("mi",null,"x"),s("mo",null,","),s("mi",null,"y"),s("mo",null,","),s("mi",null,"z"),s("mo",{stretchy:"false"},")")])],-1),m={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},g={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"10.19ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 4504 1000","aria-hidden":"true"},c=a("",1),u=[c],y=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mo",{stretchy:"false"},"("),s("msub",null,[s("mi",null,"x"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"y"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"z"),s("mn",null,"0")]),s("mo",{stretchy:"false"},")")])],-1),E={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},F={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-1.469ex"},xmlns:"http://www.w3.org/2000/svg",width:"29.427ex",height:"4.07ex",role:"img",focusable:"false",viewBox:"0 -1149.5 13006.8 1799","aria-hidden":"true"},f=a("",1),_=[f],C=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mi",{mathvariant:"normal"},"∇"),s("mi",null,"f"),s("mo",{stretchy:"false"},"("),s("msub",null,[s("mi",null,"x"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"y"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"z"),s("mn",null,"0")]),s("mo",{stretchy:"false"},")"),s("mo",null,"="),s("mrow",{"data-mjx-texclass":"INNER"},[s("mo",{"data-mjx-texclass":"OPEN"},"("),s("mfrac",null,[s("mrow",null,[s("mi",null,"∂"),s("mi",null,"f")]),s("mrow",null,[s("mi",null,"∂"),s("mi",null,"x")])]),s("mo",null,","),s("mfrac",null,[s("mrow",null,[s("mi",null,"∂"),s("mi",null,"f")]),s("mrow",null,[s("mi",null,"∂"),s("mi",null,"y")])]),s("mo",null,","),s("mfrac",null,[s("mrow",null,[s("mi",null,"∂"),s("mi",null,"f")]),s("mrow",null,[s("mi",null,"∂"),s("mi",null,"z")])]),s("mo",{"data-mjx-texclass":"CLOSE"},")")])])],-1),w=a("",13);function x(b,L,H,M,B,v){return i(),t("div",null,[Q,s("div",T,[h,s("p",null,[n("已知一个函数"),s("mjx-container",p,[(i(),t("svg",r,o)),k]),n(",则其在点"),s("mjx-container",m,[(i(),t("svg",g,u)),y]),n("处的梯度向量为: "),s("mjx-container",E,[(i(),t("svg",F,_)),C])])]),w])}const Z=l(e,[["render",x]]);export{V as __pageData,Z as default};

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/line.md","filePath":"ja/api/mp_math/line.md"}'),t={name:"ja/api/mp_math/line.md"},l=n(`<h1 id="mbcp-mp-math-line" tabindex="-1">mbcp.mp_math.line <a class="header-anchor" href="#mbcp-mp-math-line" aria-label="Permalink to &quot;mbcp.mp_math.line&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了三维空间中的直线类</p><h3 id="class-line3" tabindex="-1"><em><strong>class</strong></em> <code>Line3</code> <a class="header-anchor" href="#class-line3" aria-label="Permalink to &quot;***class*** \`Line3\`&quot;"></a></h3><h4 id="def-init-self-point-point3-direction-vector3" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, point: Point3, direction: Vector3)</code> <a class="header-anchor" href="#def-init-self-point-point3-direction-vector3" aria-label="Permalink to &quot;***def*** \`__init__(self, point: Point3, direction: Vector3)\`&quot;"></a></h4><p><strong>説明</strong>: 三维空间中的直线。由一个点和一个方向向量确定。</p><p><strong>引数</strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): 直线上的一点</li><li>direction (<a href="./vector.html#class-vector3"><code>Vector3</code></a>): 方向向量</li></ul></blockquote><details><summary><b>ソースコード</b> または <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L19" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, direction: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/line.md","filePath":"en/api/mp_math/line.md"}'),t={name:"en/api/mp_math/line.md"},l=n(`<h1 id="mbcp-mp-math-line" tabindex="-1">mbcp.mp_math.line <a class="header-anchor" href="#mbcp-mp-math-line" aria-label="Permalink to &quot;mbcp.mp_math.line&quot;"></a></h1><p><strong>Description</strong>: 本模块定义了三维空间中的直线类</p><h3 id="class-line3" tabindex="-1"><em><strong>class</strong></em> <code>Line3</code> <a class="header-anchor" href="#class-line3" aria-label="Permalink to &quot;***class*** \`Line3\`&quot;"></a></h3><h4 id="func-init-self-point-point3-direction-vector3" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, point: Point3, direction: Vector3)</code> <a class="header-anchor" href="#func-init-self-point-point3-direction-vector3" aria-label="Permalink to &quot;***func*** \`__init__(self, point: Point3, direction: Vector3)\`&quot;"></a></h4><p><strong>Description</strong>: 三维空间中的直线。由一个点和一个方向向量确定。</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): 直线上的一点</li><li>direction (<a href="./vector.html#class-vector3"><code>Vector3</code></a>): 方向向量</li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L19" target="_blank">View on 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, direction: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -6,7 +6,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> direction ([\`Vector3\`](./vector#class-vector3)): 方向向量</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> point</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> direction</span></span></code></pre></div></details><h4 id="def-approx-self-other-line3-epsilon-float-approx-bool" tabindex="-1"><em><strong>def</strong></em> <code>approx(self, other: Line3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#def-approx-self-other-line3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***def*** \`approx(self, other: Line3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L29" 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> direction</span></span></code></pre></div></details><h4 id="func-approx-self-other-line3-epsilon-float-approx-bool" tabindex="-1"><em><strong>func</strong></em> <code>approx(self, other: Line3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#func-approx-self-other-line3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***func*** \`approx(self, other: Line3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L29" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -15,7 +15,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https://docs.python.org/3/library/functions.html#bool): 是否近似相等</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.is_approx_parallel(other, epsilon) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point).is_approx_parallel(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction, epsilon)</span></span></code></pre></div></details><h4 id="def-cal-angle-self-other-line3-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>cal_angle(self, other: Line3) -&gt; AnyAngle</code> <a class="header-anchor" href="#def-cal-angle-self-other-line3-anyangle" aria-label="Permalink to &quot;***def*** \`cal_angle(self, other: Line3) -&gt; AnyAngle\`&quot;"></a></h4><p><strong></strong>: 线线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./angle.html#class-anyangle"><code>AnyAngle</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L40" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_angle</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.is_approx_parallel(other, epsilon) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point).is_approx_parallel(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction, epsilon)</span></span></code></pre></div></details><h4 id="func-cal-angle-self-other-line3-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>cal_angle(self, other: Line3) -&gt; AnyAngle</code> <a class="header-anchor" href="#func-cal-angle-self-other-line3-anyangle" aria-label="Permalink to &quot;***func*** \`cal_angle(self, other: Line3) -&gt; AnyAngle\`&quot;"></a></h4><p><strong>Description</strong>: 线线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong>Return</strong>: <a href="./angle.html#class-anyangle"><code>AnyAngle</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L40" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> cal_angle</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -23,7 +23,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`AnyAngle\`](./angle#class-anyangle): 夹角</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.direction.cal_angle(other.direction)</span></span></code></pre></div></details><h4 id="def-cal-distance-self-other-line3-point3-float" tabindex="-1"><em><strong>def</strong></em> <code>cal_distance(self, other: Line3 | Point3) -&gt; float</code> <a class="header-anchor" href="#def-cal-distance-self-other-line3-point3-float" aria-label="Permalink to &quot;***def*** \`cal_distance(self, other: Line3 | Point3) -&gt; float\`&quot;"></a></h4><p><strong></strong>: 线线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L50" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_distance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3 | Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </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:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.cal_angle(other.direction)</span></span></code></pre></div></details><h4 id="func-cal-distance-self-other-line3-point3-float" tabindex="-1"><em><strong>func</strong></em> <code>cal_distance(self, other: Line3 | Point3) -&gt; float</code> <a class="header-anchor" href="#func-cal-distance-self-other-line3-point3-float" aria-label="Permalink to &quot;***func*** \`cal_distance(self, other: Line3 | Point3) -&gt; float\`&quot;"></a></h4><p><strong>Description</strong>: 线线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): 线</li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><p><strong>Raises</strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L50" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> cal_distance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3 | Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </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;"> &quot;&quot;&quot;</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>
@ -45,7 +45,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other, Point3):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (other </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;">.point).cross(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction).length </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;">.direction.length</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type.&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-cal-intersection-self-other-line3-point3" tabindex="-1"><em><strong>def</strong></em> <code>cal_intersection(self, other: Line3) -&gt; Point3</code> <a class="header-anchor" href="#def-cal-intersection-self-other-line3-point3" aria-label="Permalink to &quot;***def*** \`cal_intersection(self, other: Line3) -&gt; Point3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>ValueError</code></a> 线</li><li><code>ValueError</code> 线</li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L80" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_intersection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type.&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-cal-intersection-self-other-line3-point3" tabindex="-1"><em><strong>func</strong></em> <code>cal_intersection(self, other: Line3) -&gt; Point3</code> <a class="header-anchor" href="#func-cal-intersection-self-other-line3-point3" aria-label="Permalink to &quot;***func*** \`cal_intersection(self, other: Line3) -&gt; Point3\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong>Return</strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><p><strong>Raises</strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>ValueError</code></a> 线</li><li><code>ValueError</code> 线</li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L80" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> cal_intersection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -60,7 +60,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ValueError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Lines are parallel and do not intersect.&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> not</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.is_coplanar(other):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ValueError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Lines are not coplanar and do not intersect.&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </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;">.direction.cross(other.direction) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">@</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.direction.cross(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point) </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;">.direction.cross(other.direction).length </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;">.direction</span></span></code></pre></div></details><h4 id="def-cal-perpendicular-self-point-point3-line3" tabindex="-1"><em><strong>def</strong></em> <code>cal_perpendicular(self, point: Point3) -&gt; Line3</code> <a class="header-anchor" href="#def-cal-perpendicular-self-point-point3-line3" aria-label="Permalink to &quot;***def*** \`cal_perpendicular(self, point: Point3) -&gt; Line3\`&quot;"></a></h4><p><strong></strong>: 线p线</p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a>: 线</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L98" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_perpendicular</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </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;">.direction.cross(other.direction) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">@</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.direction.cross(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point) </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;">.direction.cross(other.direction).length </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;">.direction</span></span></code></pre></div></details><h4 id="func-cal-perpendicular-self-point-point3-line3" tabindex="-1"><em><strong>func</strong></em> <code>cal_perpendicular(self, point: Point3) -&gt; Line3</code> <a class="header-anchor" href="#func-cal-perpendicular-self-point-point3-line3" aria-label="Permalink to &quot;***func*** \`cal_perpendicular(self, point: Point3) -&gt; Line3\`&quot;"></a></h4><p><strong>Description</strong>: 线p线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="./line.html#class-line3"><code>Line3</code></a>: 线</p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L98" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> cal_perpendicular</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 计算直线经过指定点p的垂线</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -68,7 +68,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`Line3\`](./line#class-line3): 垂线</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Line3(point, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.cross(point </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;">.point))</span></span></code></pre></div></details><h4 id="def-get-point-self-t-realnumber-point3" tabindex="-1"><em><strong>def</strong></em> <code>get_point(self, t: RealNumber) -&gt; Point3</code> <a class="header-anchor" href="#def-get-point-self-t-realnumber-point3" aria-label="Permalink to &quot;***def*** \`get_point(self, t: RealNumber) -&gt; Point3\`&quot;"></a></h4><p><strong></strong>: 线线t</p><p><strong></strong>:</p><blockquote><ul><li>t (<a href="./mp_math_typing.html#var-realnumber"><code>RealNumber</code></a>): t</li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L108" 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:#6F42C1;--shiki-dark:#B392F0;"> get_point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, t: RealNumber) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</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;"> Line3(point, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.cross(point </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;">.point))</span></span></code></pre></div></details><h4 id="func-get-point-self-t-realnumber-point3" tabindex="-1"><em><strong>func</strong></em> <code>get_point(self, t: RealNumber) -&gt; Point3</code> <a class="header-anchor" href="#func-get-point-self-t-realnumber-point3" aria-label="Permalink to &quot;***func*** \`get_point(self, t: RealNumber) -&gt; Point3\`&quot;"></a></h4><p><strong>Description</strong>: 线线t</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>t (<a href="./mp_math_typing.html#var-realnumber"><code>RealNumber</code></a>): t</li></ul></blockquote><p><strong>Return</strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L108" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> get_point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, t: RealNumber) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 获取直线上的点同一条直线但起始点和方向向量不同则同一个t对应的点不同</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -76,13 +76,13 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`Point3\`](./point#class-point3): 点</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t </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;">.direction</span></span></code></pre></div></details><h4 id="def-get-parametric-equations-self-tuple-onesinglevarfunc-onesinglevarfunc-onesinglevarfunc" tabindex="-1"><em><strong>def</strong></em> <code>get_parametric_equations(self) -&gt; tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]</code> <a class="header-anchor" href="#def-get-parametric-equations-self-tuple-onesinglevarfunc-onesinglevarfunc-onesinglevarfunc" aria-label="Permalink to &quot;***def*** \`get_parametric_equations(self) -&gt; tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>: <a href="https://docs.python.org/3/library/stdtypes.html#tuple" target="_blank" rel="noreferrer"><code>tuple</code></a>[<a href="./mp_math_typing.html#var-onesinglevarfunc"><code>OneSingleVarFunc</code></a>, <code>OneSingleVarFunc</code>, <code>OneSingleVarFunc</code>]: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L118" 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:#6F42C1;--shiki-dark:#B392F0;"> get_parametric_equations</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:</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;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t </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;">.direction</span></span></code></pre></div></details><h4 id="func-get-parametric-equations-self-tuple-onesinglevarfunc-onesinglevarfunc-onesinglevarfunc" tabindex="-1"><em><strong>func</strong></em> <code>get_parametric_equations(self) -&gt; tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]</code> <a class="header-anchor" href="#func-get-parametric-equations-self-tuple-onesinglevarfunc-onesinglevarfunc-onesinglevarfunc" aria-label="Permalink to &quot;***func*** \`get_parametric_equations(self) -&gt; tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/stdtypes.html#tuple" target="_blank" rel="noreferrer"><code>tuple</code></a>[<a href="./mp_math_typing.html#var-onesinglevarfunc"><code>OneSingleVarFunc</code></a>, <code>OneSingleVarFunc</code>, <code>OneSingleVarFunc</code>]: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L118" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> get_parametric_equations</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> [\`tuple\`](https%3A//docs.python.org/3/library/stdtypes.html#tuple)[[\`OneSingleVarFunc\`](./mp_math_typing#var-onesinglevarfunc), \`OneSingleVarFunc\`, \`OneSingleVarFunc\`]: 参数方程</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">lambda</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.x </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;">.direction.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">lambda</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.y </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;">.direction.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">lambda</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.z </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;">.direction.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t)</span></span></code></pre></div></details><h4 id="def-is-approx-parallel-self-other-line3-epsilon-float-1e-06-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -&gt; bool</code> <a class="header-anchor" href="#def-is-approx-parallel-self-other-line3-epsilon-float-1e-06-bool" aria-label="Permalink to &quot;***def*** \`is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.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:#6F42C1;--shiki-dark:#B392F0;"> is_approx_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1e-06</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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;"> (</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">lambda</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.x </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;">.direction.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">lambda</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.y </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;">.direction.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">lambda</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.z </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;">.direction.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t)</span></span></code></pre></div></details><h4 id="func-is-approx-parallel-self-other-line3-epsilon-float-1e-06-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -&gt; bool</code> <a class="header-anchor" href="#func-is-approx-parallel-self-other-line3-epsilon-float-1e-06-bool" aria-label="Permalink to &quot;***func*** \`is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L128" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> is_approx_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1e-06</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -91,7 +91,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否近似平行</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.direction.is_approx_parallel(other.direction, epsilon)</span></span></code></pre></div></details><h4 id="def-is-parallel-self-other-line3-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_parallel(self, other: Line3) -&gt; bool</code> <a class="header-anchor" href="#def-is-parallel-self-other-line3-bool" aria-label="Permalink to &quot;***def*** \`is_parallel(self, other: Line3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L139" 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:#6F42C1;--shiki-dark:#B392F0;"> is_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.is_approx_parallel(other.direction, epsilon)</span></span></code></pre></div></details><h4 id="func-is-parallel-self-other-line3-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_parallel(self, other: Line3) -&gt; bool</code> <a class="header-anchor" href="#func-is-parallel-self-other-line3-bool" aria-label="Permalink to &quot;***func*** \`is_parallel(self, other: Line3) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L139" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> is_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -99,7 +99,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否平行</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.direction.is_parallel(other.direction)</span></span></code></pre></div></details><h4 id="def-is-collinear-self-other-line3-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_collinear(self, other: Line3) -&gt; bool</code> <a class="header-anchor" href="#def-is-collinear-self-other-line3-bool" aria-label="Permalink to &quot;***def*** \`is_collinear(self, other: Line3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: 线</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L149" 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:#6F42C1;--shiki-dark:#B392F0;"> is_collinear</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.is_parallel(other.direction)</span></span></code></pre></div></details><h4 id="func-is-collinear-self-other-line3-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_collinear(self, other: Line3) -&gt; bool</code> <a class="header-anchor" href="#func-is-collinear-self-other-line3-bool" aria-label="Permalink to &quot;***func*** \`is_collinear(self, other: Line3) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: 线线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: 线</p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L149" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> is_collinear</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -107,7 +107,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否共线</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.is_parallel(other) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point).is_parallel(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction)</span></span></code></pre></div></details><h4 id="def-is-point-on-self-point-point3-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_point_on(self, point: Point3) -&gt; bool</code> <a class="header-anchor" href="#def-is-point-on-self-point-point3-bool" aria-label="Permalink to &quot;***def*** \`is_point_on(self, point: Point3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: 线</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L159" 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:#6F42C1;--shiki-dark:#B392F0;"> is_point_on</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.is_parallel(other) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point).is_parallel(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction)</span></span></code></pre></div></details><h4 id="func-is-point-on-self-point-point3-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_point_on(self, point: Point3) -&gt; bool</code> <a class="header-anchor" href="#func-is-point-on-self-point-point3-bool" aria-label="Permalink to &quot;***func*** \`is_point_on(self, point: Point3) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: 线</p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L159" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> is_point_on</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -115,7 +115,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否在直线上</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (point </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;">.point).is_parallel(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction)</span></span></code></pre></div></details><h4 id="def-is-coplanar-self-other-line3-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_coplanar(self, other: Line3) -&gt; bool</code> <a class="header-anchor" href="#def-is-coplanar-self-other-line3-bool" aria-label="Permalink to &quot;***def*** \`is_coplanar(self, other: Line3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线 线线0</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L169" 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:#6F42C1;--shiki-dark:#B392F0;"> is_coplanar</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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;"> (point </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;">.point).is_parallel(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction)</span></span></code></pre></div></details><h4 id="func-is-coplanar-self-other-line3-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_coplanar(self, other: Line3) -&gt; bool</code> <a class="header-anchor" href="#func-is-coplanar-self-other-line3-bool" aria-label="Permalink to &quot;***func*** \`is_coplanar(self, other: Line3) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: 线 线线0</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L169" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> is_coplanar</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> 充要条件两直线方向向量的叉乘与两直线上任意一点的向量的点积为0</span></span>
@ -124,7 +124,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否共面</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.direction.cross(other.direction) </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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span></span></code></pre></div></details><h4 id="def-simplify-self" tabindex="-1"><em><strong>def</strong></em> <code>simplify(self)</code> <a class="header-anchor" href="#def-simplify-self" aria-label="Permalink to &quot;***def*** \`simplify(self)\`&quot;"></a></h4><p><strong></strong>: 线 </p><p>x y z 0 </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L180" 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:#6F42C1;--shiki-dark:#B392F0;"> simplify</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.cross(other.direction) </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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span></span></code></pre></div></details><h4 id="func-simplify-self" tabindex="-1"><em><strong>func</strong></em> <code>simplify(self)</code> <a class="header-anchor" href="#func-simplify-self" aria-label="Permalink to &quot;***func*** \`simplify(self)\`&quot;"></a></h4><p><strong>Description</strong>: 线 </p><p>x y z 0 </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L180" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> simplify</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -137,7 +137,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="def-from-two-points-cls-p1-point3-p2-point3-line3" tabindex="-1"><em><strong>def</strong></em> <code>from_two_points(cls, p1: Point3, p2: Point3) -&gt; Line3</code> <a class="header-anchor" href="#def-from-two-points-cls-p1-point3-p2-point3-line3" aria-label="Permalink to &quot;***def*** \`from_two_points(cls, p1: Point3, p2: Point3) -&gt; Line3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>p1 (<a href="./point.html#class-point3"><code>Point3</code></a>): 1</li><li>p2 (<a href="./point.html#class-point3"><code>Point3</code></a>): 2</li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a>: 线</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L199" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="func-from-two-points-cls-p1-point3-p2-point3-line3" tabindex="-1"><em><strong>func</strong></em> <code>from_two_points(cls, p1: Point3, p2: Point3) -&gt; Line3</code> <a class="header-anchor" href="#func-from-two-points-cls-p1-point3-p2-point3-line3" aria-label="Permalink to &quot;***func*** \`from_two_points(cls, p1: Point3, p2: Point3) -&gt; Line3\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>p1 (<a href="./point.html#class-point3"><code>Point3</code></a>): 1</li><li>p2 (<a href="./point.html#class-point3"><code>Point3</code></a>): 2</li></ul></blockquote><p><strong>Return</strong>: <a href="./line.html#class-line3"><code>Line3</code></a>: 线</p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L199" target="_blank">View on 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> from_two_points</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(cls, p1: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, p2: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 工厂函数 由两点构造直线</span></span>
@ -148,7 +148,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> [\`Line3\`](./line#class-line3): 直线</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> direction </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p1</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(p1, direction)</span></span></code></pre></div></details><h4 id="def-and-self-other-line3-line3-point3-none" tabindex="-1"><em><strong>def</strong></em> <code>__and__(self, other: Line3) -&gt; Line3 | Point3 | None</code> <a class="header-anchor" href="#def-and-self-other-line3-line3-point3-none" aria-label="Permalink to &quot;***def*** \`__and__(self, other: Line3) -&gt; Line3 | Point3 | None\`&quot;"></a></h4><p><strong></strong>: 线线线None线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a> | <a href="https://docs.python.org/3/library/constants.html#None" target="_blank" rel="noreferrer"><code>None</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L211" 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;"> __and__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3 | Point3 | None&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(p1, direction)</span></span></code></pre></div></details><h4 id="func-and-self-other-line3-line3-point3-none" tabindex="-1"><em><strong>func</strong></em> <code>__and__(self, other: Line3) -&gt; Line3 | Point3 | None</code> <a class="header-anchor" href="#func-and-self-other-line3-line3-point3-none" aria-label="Permalink to &quot;***func*** \`__and__(self, other: Line3) -&gt; Line3 | Point3 | None\`&quot;"></a></h4><p><strong>Description</strong>: 线线线None线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong>Return</strong>: <a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a> | <a href="https://docs.python.org/3/library/constants.html#None" target="_blank" rel="noreferrer"><code>None</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L211" target="_blank">View on 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;"> __and__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3 | Point3 | None&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 计算两条直线点集合的交集重合线返回自身平行线返回None交线返回交点</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -161,7 +161,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.is_parallel(other) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">or</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> not</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.is_coplanar(other):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> None</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>
<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;">.cal_intersection(other)</span></span></code></pre></div></details><h4 id="def-eq-self-other-bool" tabindex="-1"><em><strong>def</strong></em> <code>__eq__(self, other) -&gt; bool</code> <a class="header-anchor" href="#def-eq-self-other-bool" aria-label="Permalink to &quot;***def*** \`__eq__(self, other) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线</p><p>v1 // v2 (p1 - p2) // v1</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L226" 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) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.cal_intersection(other)</span></span></code></pre></div></details><h4 id="func-eq-self-other-bool" tabindex="-1"><em><strong>func</strong></em> <code>__eq__(self, other) -&gt; bool</code> <a class="header-anchor" href="#func-eq-self-other-bool" aria-label="Permalink to &quot;***func*** \`__eq__(self, other) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p>v1 // v2 (p1 - p2) // v1</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L226" target="_blank">View on 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) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 判断两条直线是否等价</span></span>
<span class="line"></span>
@ -171,4 +171,4 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否等价</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.direction.is_parallel(other.direction) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point).is_parallel(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction)</span></span></code></pre></div></details>`,106),e=[l];function p(h,k,r,o,d,g){return a(),i("div",null,e)}const E=s(t,[["render",p]]);export{F as __pageData,E as default};
<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;">.direction.is_parallel(other.direction) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point).is_parallel(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction)</span></span></code></pre></div></details>`,106),e=[l];function p(h,k,r,o,d,c){return a(),i("div",null,e)}const E=s(t,[["render",p]]);export{F as __pageData,E as default};

View File

@ -1 +1 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/line.md","filePath":"en/api/mp_math/line.md"}'),t={name:"en/api/mp_math/line.md"},l=n("",106),e=[l];function p(h,k,r,o,d,g){return a(),i("div",null,e)}const E=s(t,[["render",p]]);export{F as __pageData,E as default};
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/line.md","filePath":"en/api/mp_math/line.md"}'),t={name:"en/api/mp_math/line.md"},l=n("",106),e=[l];function p(h,k,r,o,d,c){return a(),i("div",null,e)}const E=s(t,[["render",p]]);export{F as __pageData,E as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane","lastUpdated":false},"headers":[],"relativePath":"zht/api/mp_math/plane.md","filePath":"zht/api/mp_math/plane.md"}'),l={name:"zht/api/mp_math/plane.md"},t=n(`<h1 id="mbcp-mp-math-plane" tabindex="-1">mbcp.mp_math.plane <a class="header-anchor" href="#mbcp-mp-math-plane" aria-label="Permalink to &quot;mbcp.mp_math.plane&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了三维空间中的平面类</p><h3 id="class-plane3" tabindex="-1"><em><strong>class</strong></em> <code>Plane3</code> <a class="header-anchor" href="#class-plane3" aria-label="Permalink to &quot;***class*** \`Plane3\`&quot;"></a></h3><h4 id="def-init-self-a-float-b-float-c-float-d-float" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, a: float, b: float, c: float, d: float)</code> <a class="header-anchor" href="#def-init-self-a-float-b-float-c-float-d-float" aria-label="Permalink to &quot;***def*** \`__init__(self, a: float, b: float, c: float, d: float)\`&quot;"></a></h4><p><strong>説明</strong>: 平面方程ax + by + cz + d = 0</p><p><strong>變數説明</strong>:</p><blockquote><ul><li>a (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): x系数</li><li>b (<code>float</code>): y系数</li><li>c (<code>float</code>): z系数</li><li>d (<code>float</code>): 常数项</li></ul></blockquote><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L20" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, a: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, b: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, c: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, d: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/plane.md","filePath":"en/api/mp_math/plane.md"}'),l={name:"en/api/mp_math/plane.md"},t=n(`<h1 id="mbcp-mp-math-plane" tabindex="-1">mbcp.mp_math.plane <a class="header-anchor" href="#mbcp-mp-math-plane" aria-label="Permalink to &quot;mbcp.mp_math.plane&quot;"></a></h1><p><strong>Description</strong>: 本模块定义了三维空间中的平面类</p><h3 id="class-plane3" tabindex="-1"><em><strong>class</strong></em> <code>Plane3</code> <a class="header-anchor" href="#class-plane3" aria-label="Permalink to &quot;***class*** \`Plane3\`&quot;"></a></h3><h4 id="func-init-self-a-float-b-float-c-float-d-float" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, a: float, b: float, c: float, d: float)</code> <a class="header-anchor" href="#func-init-self-a-float-b-float-c-float-d-float" aria-label="Permalink to &quot;***func*** \`__init__(self, a: float, b: float, c: float, d: float)\`&quot;"></a></h4><p><strong>Description</strong>: 平面方程ax + by + cz + d = 0</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>a (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): x系数</li><li>b (<code>float</code>): y系数</li><li>c (<code>float</code>): z系数</li><li>d (<code>float</code>): 常数项</li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L20" target="_blank">View on 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, a: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, b: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, c: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, d: </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;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 平面方程ax + by + cz + d = 0</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -10,7 +10,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> a</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.b </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> b</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> c</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.d </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> d</span></span></code></pre></div></details><h4 id="def-approx-self-other-plane3-bool" tabindex="-1"><em><strong>def</strong></em> <code>approx(self, other: Plane3) -&gt; bool</code> <a class="header-anchor" href="#def-approx-self-other-plane3-bool" aria-label="Permalink to &quot;***def*** \`approx(self, other: Plane3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L34" 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.d </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> d</span></span></code></pre></div></details><h4 id="func-approx-self-other-plane3-bool" tabindex="-1"><em><strong>func</strong></em> <code>approx(self, other: Plane3) -&gt; bool</code> <a class="header-anchor" href="#func-approx-self-other-plane3-bool" aria-label="Permalink to &quot;***func*** \`approx(self, other: Plane3) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L34" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -28,7 +28,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> k </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.c </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;">.c</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> approx(other.a, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> k) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> approx(other.b, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.b </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> k) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> approx(other.d, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.d </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> k)</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> False</span></span></code></pre></div></details><h4 id="def-cal-angle-self-other-line3-plane3-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>cal_angle(self, other: Line3 | Plane3) -&gt; AnyAngle</code> <a class="header-anchor" href="#def-cal-angle-self-other-line3-plane3-anyangle" aria-label="Permalink to &quot;***def*** \`cal_angle(self, other: Line3 | Plane3) -&gt; AnyAngle\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./plane.html#class-plane3"><code>Plane3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./angle.html#class-anyangle"><code>AnyAngle</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L54" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_angle</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3 | Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> False</span></span></code></pre></div></details><h4 id="func-cal-angle-self-other-line3-plane3-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>cal_angle(self, other: Line3 | Plane3) -&gt; AnyAngle</code> <a class="header-anchor" href="#func-cal-angle-self-other-line3-plane3-anyangle" aria-label="Permalink to &quot;***func*** \`cal_angle(self, other: Line3 | Plane3) -&gt; AnyAngle\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./plane.html#class-plane3"><code>Plane3</code></a>): 线</li></ul></blockquote><p><strong>Return</strong>: <a href="./angle.html#class-anyangle"><code>AnyAngle</code></a>: </p><p><strong>Raises</strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L54" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> cal_angle</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3 | Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -43,7 +43,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other, Plane3):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> AnyAngle(math.acos(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.normal </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">@</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.normal </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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.normal.length </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.normal.length)), </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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> else</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-cal-distance-self-other-plane3-point3-float" tabindex="-1"><em><strong>def</strong></em> <code>cal_distance(self, other: Plane3 | Point3) -&gt; float</code> <a class="header-anchor" href="#def-cal-distance-self-other-plane3-point3-float" aria-label="Permalink to &quot;***def*** \`cal_distance(self, other: Plane3 | Point3) -&gt; float\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L71" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_distance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3 | Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </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:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-cal-distance-self-other-plane3-point3-float" tabindex="-1"><em><strong>func</strong></em> <code>cal_distance(self, other: Plane3 | Point3) -&gt; float</code> <a class="header-anchor" href="#func-cal-distance-self-other-plane3-point3-float" aria-label="Permalink to &quot;***func*** \`cal_distance(self, other: Plane3 | Point3) -&gt; float\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><p><strong>Raises</strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L71" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> cal_distance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3 | Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </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;"> &quot;&quot;&quot;</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>
@ -58,7 +58,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other, Point3):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x </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;">.b </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y </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;">.c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z </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;">.d) </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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a </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;">.b </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;">.c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">**</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">**</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0.5</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-cal-intersection-line3-self-other-plane3-line3" tabindex="-1"><em><strong>def</strong></em> <code>cal_intersection_line3(self, other: Plane3) -&gt; Line3</code> <a class="header-anchor" href="#def-cal-intersection-line3-self-other-plane3-line3" aria-label="Permalink to &quot;***def*** \`cal_intersection_line3(self, other: Plane3) -&gt; Line3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a>: 线</p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#ValueError" target="_blank" rel="noreferrer"><code>ValueError</code></a> 线</li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L88" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_intersection_line3</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-cal-intersection-line3-self-other-plane3-line3" tabindex="-1"><em><strong>func</strong></em> <code>cal_intersection_line3(self, other: Plane3) -&gt; Line3</code> <a class="header-anchor" href="#func-cal-intersection-line3-self-other-plane3-line3" aria-label="Permalink to &quot;***func*** \`cal_intersection_line3(self, other: Plane3) -&gt; Line3\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="./line.html#class-line3"><code>Line3</code></a>: 线</p><p><strong>Raises</strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#ValueError" target="_blank" rel="noreferrer"><code>ValueError</code></a> 线</li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L88" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> cal_intersection_line3</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -84,7 +84,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> A </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> np.array([[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.b], [other.a, other.b]])</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> B </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> np.array([</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;">.d, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">other.d])</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x, y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> np.linalg.solve(A, B)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Line3(Point3(x, y, z), direction)</span></span></code></pre></div></details><h4 id="def-cal-intersection-point3-self-other-line3-point3" tabindex="-1"><em><strong>def</strong></em> <code>cal_intersection_point3(self, other: Line3) -&gt; Point3</code> <a class="header-anchor" href="#def-cal-intersection-point3-self-other-line3-point3" aria-label="Permalink to &quot;***def*** \`cal_intersection_point3(self, other: Line3) -&gt; Point3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#ValueError" target="_blank" rel="noreferrer"><code>ValueError</code></a> 线</li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L121" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_intersection_point3</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</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;"> Line3(Point3(x, y, z), direction)</span></span></code></pre></div></details><h4 id="func-cal-intersection-point3-self-other-line3-point3" tabindex="-1"><em><strong>func</strong></em> <code>cal_intersection_point3(self, other: Line3) -&gt; Point3</code> <a class="header-anchor" href="#func-cal-intersection-point3-self-other-line3-point3" aria-label="Permalink to &quot;***func*** \`cal_intersection_point3(self, other: Line3) -&gt; Point3\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong>Return</strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><p><strong>Raises</strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#ValueError" target="_blank" rel="noreferrer"><code>ValueError</code></a> 线</li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L121" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> cal_intersection_point3</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -98,7 +98,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ValueError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;The plane and the line are parallel or coincident.&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x, y, z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.get_parametric_equations()</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point.x </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;">.b </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point.y </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;">.c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point.z </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;">.d) </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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.direction.x </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;">.b </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.direction.y </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;">.c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.direction.z)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(x(t), y(t), z(t))</span></span></code></pre></div></details><h4 id="def-cal-parallel-plane3-self-point-point3-plane3" tabindex="-1"><em><strong>def</strong></em> <code>cal_parallel_plane3(self, point: Point3) -&gt; Plane3</code> <a class="header-anchor" href="#def-cal-parallel-plane3-self-point-point3-plane3" aria-label="Permalink to &quot;***def*** \`cal_parallel_plane3(self, point: Point3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./plane.html#class-plane3"><code>Plane3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L141" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_parallel_plane3</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</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;"> Point3(x(t), y(t), z(t))</span></span></code></pre></div></details><h4 id="func-cal-parallel-plane3-self-point-point3-plane3" tabindex="-1"><em><strong>func</strong></em> <code>cal_parallel_plane3(self, point: Point3) -&gt; Plane3</code> <a class="header-anchor" href="#func-cal-parallel-plane3-self-point-point3-plane3" aria-label="Permalink to &quot;***func*** \`cal_parallel_plane3(self, point: Point3) -&gt; Plane3\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="./plane.html#class-plane3"><code>Plane3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L141" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> cal_parallel_plane3</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -106,7 +106,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<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;"> [\`Plane3\`](./plane#class-plane3): 平面</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Plane3.from_point_and_normal(point, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.normal)</span></span></code></pre></div></details><h4 id="def-is-parallel-self-other-plane3-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_parallel(self, other: Plane3) -&gt; bool</code> <a class="header-anchor" href="#def-is-parallel-self-other-plane3-bool" aria-label="Permalink to &quot;***def*** \`is_parallel(self, other: Plane3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.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:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> is_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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;"> Plane3.from_point_and_normal(point, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.normal)</span></span></code></pre></div></details><h4 id="func-is-parallel-self-other-plane3-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_parallel(self, other: Plane3) -&gt; bool</code> <a class="header-anchor" href="#func-is-parallel-self-other-plane3-bool" aria-label="Permalink to &quot;***func*** \`is_parallel(self, other: Plane3) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L151" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> is_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -114,14 +114,14 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否平行</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.normal.is_parallel(other.normal)</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="def-normal-self-vector3" tabindex="-1"><em><strong>def</strong></em> <code>normal(self) -&gt; Vector3</code> <a class="header-anchor" href="#def-normal-self-vector3" aria-label="Permalink to &quot;***def*** \`normal(self) -&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>: <a href="./vector.html#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L162" 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>
<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;">.normal.is_parallel(other.normal)</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="func-normal-self-vector3" tabindex="-1"><em><strong>func</strong></em> <code>normal(self) -&gt; Vector3</code> <a class="header-anchor" href="#func-normal-self-vector3" aria-label="Permalink to &quot;***func*** \`normal(self) -&gt; Vector3\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Return</strong>: <a href="./vector.html#class-vector3"><code>Vector3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L162" target="_blank">View on 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> normal</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> [\`Vector3\`](./vector#class-vector3): 法向量</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.b, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.c)</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="def-from-point-and-normal-cls-point-point3-normal-vector3-plane3" tabindex="-1"><em><strong>def</strong></em> <code>from_point_and_normal(cls, point: Point3, normal: Vector3) -&gt; Plane3</code> <a class="header-anchor" href="#def-from-point-and-normal-cls-point-point3-normal-vector3-plane3" aria-label="Permalink to &quot;***def*** \`from_point_and_normal(cls, point: Point3, normal: Vector3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: ()</p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li><li>normal (<a href="./vector.html#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./plane.html#class-plane3"><code>Plane3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L171" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.b, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.c)</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="func-from-point-and-normal-cls-point-point3-normal-vector3-plane3" tabindex="-1"><em><strong>func</strong></em> <code>from_point_and_normal(cls, point: Point3, normal: Vector3) -&gt; Plane3</code> <a class="header-anchor" href="#func-from-point-and-normal-cls-point-point3-normal-vector3-plane3" aria-label="Permalink to &quot;***func*** \`from_point_and_normal(cls, point: Point3, normal: Vector3) -&gt; Plane3\`&quot;"></a></h4><p><strong>Description</strong>: ()</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li><li>normal (<a href="./vector.html#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="./plane.html#class-plane3"><code>Plane3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L171" target="_blank">View on 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> from_point_and_normal</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(cls, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, normal: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 工厂函数 由点和法向量构造平面(点法式构造)</span></span>
@ -133,7 +133,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> a, b, c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (normal.x, normal.y, normal.z)</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> d </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> -</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">a </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> point.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> b </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> point.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> point.z</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(a, b, c, d)</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="def-from-three-points-cls-p1-point3-p2-point3-p3-point3-plane3" tabindex="-1"><em><strong>def</strong></em> <code>from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -&gt; Plane3</code> <a class="header-anchor" href="#def-from-three-points-cls-p1-point3-p2-point3-p3-point3-plane3" aria-label="Permalink to &quot;***def*** \`from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>p1 (<a href="./point.html#class-point3"><code>Point3</code></a>): 1</li><li>p2 (<code>Point3</code>): 2</li><li>p3 (<code>Point3</code>): 3</li></ul></blockquote><p><strong></strong>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L185" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(a, b, c, d)</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="func-from-three-points-cls-p1-point3-p2-point3-p3-point3-plane3" tabindex="-1"><em><strong>func</strong></em> <code>from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -&gt; Plane3</code> <a class="header-anchor" href="#func-from-three-points-cls-p1-point3-p2-point3-p3-point3-plane3" aria-label="Permalink to &quot;***func*** \`from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -&gt; Plane3\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>p1 (<a href="./point.html#class-point3"><code>Point3</code></a>): 1</li><li>p2 (<code>Point3</code>): 2</li><li>p3 (<code>Point3</code>): 3</li></ul></blockquote><p><strong>Return</strong>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L185" target="_blank">View on 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> from_three_points</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(cls, p1: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, p2: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, p3: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 工厂函数 由三点构造平面</span></span>
@ -147,7 +147,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> v1 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p1</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> v2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p3 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p1</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> normal </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> v1.cross(v2)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.from_point_and_normal(p1, normal)</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="def-from-two-lines-cls-l1-line3-l2-line3-plane3" tabindex="-1"><em><strong>def</strong></em> <code>from_two_lines(cls, l1: Line3, l2: Line3) -&gt; Plane3</code> <a class="header-anchor" href="#def-from-two-lines-cls-l1-line3-l2-line3-plane3" aria-label="Permalink to &quot;***def*** \`from_two_lines(cls, l1: Line3, l2: Line3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>l1 (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li><li>l2 (<code>Line3</code>): 线</li></ul></blockquote><p><strong></strong>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L203" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.from_point_and_normal(p1, normal)</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="func-from-two-lines-cls-l1-line3-l2-line3-plane3" tabindex="-1"><em><strong>func</strong></em> <code>from_two_lines(cls, l1: Line3, l2: Line3) -&gt; Plane3</code> <a class="header-anchor" href="#func-from-two-lines-cls-l1-line3-l2-line3-plane3" aria-label="Permalink to &quot;***func*** \`from_two_lines(cls, l1: Line3, l2: Line3) -&gt; Plane3\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>l1 (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li><li>l2 (<code>Line3</code>): 线</li></ul></blockquote><p><strong>Return</strong>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L203" target="_blank">View on 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> from_two_lines</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(cls, l1: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, l2: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 工厂函数 由两直线构造平面</span></span>
@ -161,7 +161,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> v2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> l2.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> l1.point</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> v2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> zero_vector3:</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> v2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> l2.get_point(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> l1.point</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.from_point_and_normal(l1.point, v1.cross(v2))</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="def-from-point-and-line-cls-point-point3-line-line3-plane3" tabindex="-1"><em><strong>def</strong></em> <code>from_point_and_line(cls, point: Point3, line: Line3) -&gt; Plane3</code> <a class="header-anchor" href="#def-from-point-and-line-cls-point-point3-line-line3-plane3" aria-label="Permalink to &quot;***def*** \`from_point_and_line(cls, point: Point3, line: Line3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li><li>line (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L219" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.from_point_and_normal(l1.point, v1.cross(v2))</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="func-from-point-and-line-cls-point-point3-line-line3-plane3" tabindex="-1"><em><strong>func</strong></em> <code>from_point_and_line(cls, point: Point3, line: Line3) -&gt; Plane3</code> <a class="header-anchor" href="#func-from-point-and-line-cls-point-point3-line-line3-plane3" aria-label="Permalink to &quot;***func*** \`from_point_and_line(cls, point: Point3, line: Line3) -&gt; Plane3\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li><li>line (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong>Return</strong>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L219" target="_blank">View on 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> from_point_and_line</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(cls, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, line: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 工厂函数 由点和直线构造平面</span></span>
@ -171,11 +171,11 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<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;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.from_point_and_normal(point, line.direction)</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-and-self-other-line3-point3-none" tabindex="-1"><em><strong>def</strong></em> <code>__and__(self, other: Line3) -&gt; Point3 | None</code> <a class="header-anchor" href="#def-and-self-other-line3-point3-none" aria-label="Permalink to &quot;***def*** \`__and__(self, other: Line3) -&gt; Point3 | None\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L256" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.from_point_and_normal(point, line.direction)</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-and-self-other-line3-point3-none" tabindex="-1"><em><strong>func</strong></em> <code>__and__(self, other: Line3) -&gt; Point3 | None</code> <a class="header-anchor" href="#func-and-self-other-line3-point3-none" aria-label="Permalink to &quot;***func*** \`__and__(self, other: Line3) -&gt; Point3 | None\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L256" target="_blank">View on 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __and__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3 | None&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-and-self-other-plane3-line3-none" tabindex="-1"><em><strong>def</strong></em> <code>__and__(self, other: Plane3) -&gt; Line3 | None</code> <a class="header-anchor" href="#def-and-self-other-plane3-line3-none" aria-label="Permalink to &quot;***def*** \`__and__(self, other: Plane3) -&gt; Line3 | None\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L260" 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-and-self-other-plane3-line3-none" tabindex="-1"><em><strong>func</strong></em> <code>__and__(self, other: Plane3) -&gt; Line3 | None</code> <a class="header-anchor" href="#func-and-self-other-plane3-line3-none" aria-label="Permalink to &quot;***func*** \`__and__(self, other: Plane3) -&gt; Line3 | None\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L260" target="_blank">View on 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __and__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3 | None&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="def-and-self-other" tabindex="-1"><em><strong>def</strong></em> <code>__and__(self, other)</code> <a class="header-anchor" href="#def-and-self-other" aria-label="Permalink to &quot;***def*** \`__and__(self, other)\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./plane.html#class-plane3"><code>Plane3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a> | <a href="https://docs.python.org/3/library/constants.html#None" target="_blank" rel="noreferrer"><code>None</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L263" 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;"> __and__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other):</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="func-and-self-other" tabindex="-1"><em><strong>func</strong></em> <code>__and__(self, other)</code> <a class="header-anchor" href="#func-and-self-other" aria-label="Permalink to &quot;***func*** \`__and__(self, other)\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./plane.html#class-plane3"><code>Plane3</code></a>): 线</li></ul></blockquote><p><strong>Return</strong>: <a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a> | <a href="https://docs.python.org/3/library/constants.html#None" target="_blank" rel="noreferrer"><code>None</code></a>: </p><p><strong>Raises</strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L263" target="_blank">View on 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;"> __and__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -194,7 +194,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> None</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;">.cal_intersection_point3(other)</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for &amp;: &#39;Plane3&#39; and &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-eq-self-other-bool" tabindex="-1"><em><strong>def</strong></em> <code>__eq__(self, other) -&gt; bool</code> <a class="header-anchor" href="#def-eq-self-other-bool" aria-label="Permalink to &quot;***def*** \`__eq__(self, other) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L284" 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) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for &amp;: &#39;Plane3&#39; and &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-eq-self-other-bool" tabindex="-1"><em><strong>func</strong></em> <code>__eq__(self, other) -&gt; bool</code> <a class="header-anchor" href="#func-eq-self-other-bool" aria-label="Permalink to &quot;***func*** \`__eq__(self, other) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L284" target="_blank">View on 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) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -202,5 +202,5 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否等价</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.approx(other)</span></span></code></pre></div></details><h4 id="def-rand-self-other-line3-point3" tabindex="-1"><em><strong>def</strong></em> <code>__rand__(self, other: Line3) -&gt; Point3</code> <a class="header-anchor" href="#def-rand-self-other-line3-point3" aria-label="Permalink to &quot;***def*** \`__rand__(self, other: Line3) -&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L294" 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;"> __rand__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.cal_intersection_point3(other)</span></span></code></pre></div></details>`,113),h=[t];function p(e,k,r,o,d,E){return a(),i("div",null,h)}const F=s(l,[["render",p]]);export{y as __pageData,F as default};
<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;">.approx(other)</span></span></code></pre></div></details><h4 id="func-rand-self-other-line3-point3" tabindex="-1"><em><strong>func</strong></em> <code>__rand__(self, other: Line3) -&gt; Point3</code> <a class="header-anchor" href="#func-rand-self-other-line3-point3" aria-label="Permalink to &quot;***func*** \`__rand__(self, other: Line3) -&gt; Point3\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L294" target="_blank">View on 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;"> __rand__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.cal_intersection_point3(other)</span></span></code></pre></div></details>`,113),h=[t];function p(e,k,r,o,d,E){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{c as __pageData,y as default};

View File

@ -1 +1 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/plane.md","filePath":"en/api/mp_math/plane.md"}'),l={name:"en/api/mp_math/plane.md"},t=n("",113),h=[t];function e(p,k,r,o,d,E){return a(),i("div",null,h)}const c=s(l,[["render",e]]);export{y as __pageData,c as default};
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/plane.md","filePath":"en/api/mp_math/plane.md"}'),l={name:"en/api/mp_math/plane.md"},t=n("",113),h=[t];function p(e,k,r,o,d,E){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{c as __pageData,y as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point","lastUpdated":false},"headers":[],"relativePath":"zht/api/mp_math/point.md","filePath":"zht/api/mp_math/point.md"}'),n={name:"zht/api/mp_math/point.md"},l=t(`<h1 id="mbcp-mp-math-point" tabindex="-1">mbcp.mp_math.point <a class="header-anchor" href="#mbcp-mp-math-point" aria-label="Permalink to &quot;mbcp.mp_math.point&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了三维空间中点的类。</p><h3 id="class-point3" tabindex="-1"><em><strong>class</strong></em> <code>Point3</code> <a class="header-anchor" href="#class-point3" aria-label="Permalink to &quot;***class*** \`Point3\`&quot;"></a></h3><h4 id="def-init-self-x-float-y-float-z-float" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, x: float, y: float, z: float)</code> <a class="header-anchor" href="#def-init-self-x-float-y-float-z-float" aria-label="Permalink to &quot;***def*** \`__init__(self, x: float, y: float, z: float)\`&quot;"></a></h4><p><strong>説明</strong>: 笛卡尔坐标系中的点。</p><p><strong>變數説明</strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): x 坐标</li><li>y (<code>float</code>): y 坐标</li><li>z (<code>float</code>): z 坐标</li></ul></blockquote><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L15" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, z: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/point.md","filePath":"en/api/mp_math/point.md"}'),n={name:"en/api/mp_math/point.md"},l=t(`<h1 id="mbcp-mp-math-point" tabindex="-1">mbcp.mp_math.point <a class="header-anchor" href="#mbcp-mp-math-point" aria-label="Permalink to &quot;mbcp.mp_math.point&quot;"></a></h1><p><strong>Description</strong>: 本模块定义了三维空间中点的类。</p><h3 id="class-point3" tabindex="-1"><em><strong>class</strong></em> <code>Point3</code> <a class="header-anchor" href="#class-point3" aria-label="Permalink to &quot;***class*** \`Point3\`&quot;"></a></h3><h4 id="func-init-self-x-float-y-float-z-float" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, x: float, y: float, z: float)</code> <a class="header-anchor" href="#func-init-self-x-float-y-float-z-float" aria-label="Permalink to &quot;***func*** \`__init__(self, x: float, y: float, z: float)\`&quot;"></a></h4><p><strong>Description</strong>: 笛卡尔坐标系中的点。</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): x 坐标</li><li>y (<code>float</code>): y 坐标</li><li>z (<code>float</code>): z 坐标</li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L15" target="_blank">View on 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, z: </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;"> &quot;&quot;&quot;</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>
@ -8,7 +8,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> y</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> z</span></span></code></pre></div></details><h4 id="def-approx-self-other-point3-epsilon-float-approx-bool" tabindex="-1"><em><strong>def</strong></em> <code>approx(self, other: Point3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#def-approx-self-other-point3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***def*** \`approx(self, other: Point3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L27" 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> z</span></span></code></pre></div></details><h4 id="func-approx-self-other-point3-epsilon-float-approx-bool" tabindex="-1"><em><strong>func</strong></em> <code>approx(self, other: Point3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#func-approx-self-other-point3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***func*** \`approx(self, other: Point3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L27" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -17,11 +17,11 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`bool\`](https://docs.python.org/3/library/functions.html#bool): 是否近似相等</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> all</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon])</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-vector3-point3" tabindex="-1"><em><strong>def</strong></em> <code>self + other: Vector3 =&gt; Point3</code> <a class="header-anchor" href="#def-self-other-vector3-point3" aria-label="Permalink to &quot;***def*** \`self + other: Vector3 =&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L47" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> all</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon])</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-vector3-point3" tabindex="-1"><em><strong>func</strong></em> <code>self + other: Vector3 =&gt; Point3</code> <a class="header-anchor" href="#func-self-other-vector3-point3" aria-label="Permalink to &quot;***func*** \`self + other: Vector3 =&gt; Point3\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L47" target="_blank">View on 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>
<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;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-point3-point3" tabindex="-1"><em><strong>def</strong></em> <code>self + other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#def-self-other-point3-point3" aria-label="Permalink to &quot;***def*** \`self + other: Point3 =&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L51" 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-point3-point3" tabindex="-1"><em><strong>func</strong></em> <code>self + other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#func-self-other-point3-point3" aria-label="Permalink to &quot;***func*** \`self + other: Point3 =&gt; Point3\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L51" target="_blank">View on 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>
<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;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="def-self-other" tabindex="-1"><em><strong>def</strong></em> <code>self + other</code> <a class="header-anchor" href="#def-self-other" aria-label="Permalink to &quot;***def*** \`self + other\`&quot;"></a></h4><p><strong></strong>: P + V -&gt; P P + P -&gt; P</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./vector.html#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L54" 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="func-self-other" tabindex="-1"><em><strong>func</strong></em> <code>self + other</code> <a class="header-anchor" href="#func-self-other" aria-label="Permalink to &quot;***func*** \`self + other\`&quot;"></a></h4><p><strong>Description</strong>: P + V -&gt; P P + P -&gt; P</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./vector.html#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L54" target="_blank">View on 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>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> P + V -&gt; P</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> P + P -&gt; P</span></span>
@ -30,7 +30,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`Point3\`](./point#class-point3): 新的点</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</span></span></code></pre></div></details><h4 id="def-eq-self-other" tabindex="-1"><em><strong>def</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#def-eq-self-other" aria-label="Permalink to &quot;***def*** \`__eq__(self, other)\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L65" 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;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</span></span></code></pre></div></details><h4 id="func-eq-self-other" tabindex="-1"><em><strong>func</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#func-eq-self-other" aria-label="Permalink to &quot;***func*** \`__eq__(self, other)\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L65" target="_blank">View on 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:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -38,7 +38,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`bool\`](https://docs.python.org/3/library/functions.html#bool): 是否相等</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.x, other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.y, other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.z, other.z)</span></span></code></pre></div></details><h4 id="def-self-other-point3-vector3" tabindex="-1"><em><strong>def</strong></em> <code>self - other: Point3 =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-point3-vector3" aria-label="Permalink to &quot;***def*** \`self - other: Point3 =&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: P - P -&gt; V</p><p>P - V -&gt; P <a href="./vector.html#class-vector3"><code>Vector3</code></a> </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./vector.html#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.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:#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;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</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;"> approx(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x, other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.y, other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.z, other.z)</span></span></code></pre></div></details><h4 id="func-self-other-point3-vector3" tabindex="-1"><em><strong>func</strong></em> <code>self - other: Point3 =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-point3-vector3" aria-label="Permalink to &quot;***func*** \`self - other: Point3 =&gt; Vector3\`&quot;"></a></h4><p><strong>Description</strong>: P - P -&gt; V</p><p>P - V -&gt; P <a href="./vector.html#class-vector3"><code>Vector3</code></a> </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="./vector.html#class-vector3"><code>Vector3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L75" target="_blank">View on 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;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> P - P -&gt; V</span></span>
<span class="line"></span>
@ -49,4 +49,4 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> [\`Vector3\`](./vector#class-vector3): 新的向量</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> from</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> .vector </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</span></span></code></pre></div></details>`,39),h=[l];function e(p,k,o,r,d,g){return a(),i("div",null,h)}const y=s(n,[["render",e]]);export{E as __pageData,y as default};
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</span></span></code></pre></div></details>`,39),e=[l];function h(p,o,k,r,d,c){return a(),i("div",null,e)}const y=s(n,[["render",h]]);export{E as __pageData,y as default};

View File

@ -1 +1 @@
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/point.md","filePath":"en/api/mp_math/point.md"}'),n={name:"en/api/mp_math/point.md"},e=t("",39),l=[e];function h(p,o,k,r,d,c){return a(),i("div",null,l)}const y=s(n,[["render",h]]);export{E as __pageData,y as default};
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/point.md","filePath":"en/api/mp_math/point.md"}'),n={name:"en/api/mp_math/point.md"},l=t("",39),e=[l];function h(p,o,k,r,d,c){return a(),i("div",null,e)}const y=s(n,[["render",h]]);export{E as __pageData,y as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment","lastUpdated":false},"headers":[],"relativePath":"zht/api/mp_math/segment.md","filePath":"zht/api/mp_math/segment.md"}'),t={name:"zht/api/mp_math/segment.md"},p=n(`<h1 id="mbcp-mp-math-segment" tabindex="-1">mbcp.mp_math.segment <a class="header-anchor" href="#mbcp-mp-math-segment" aria-label="Permalink to &quot;mbcp.mp_math.segment&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了三维空间中的线段类</p><h3 id="class-segment3" tabindex="-1"><em><strong>class</strong></em> <code>Segment3</code> <a class="header-anchor" href="#class-segment3" aria-label="Permalink to &quot;***class*** \`Segment3\`&quot;"></a></h3><h4 id="def-init-self-p1-point3-p2-point3" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, p1: Point3, p2: Point3)</code> <a class="header-anchor" href="#def-init-self-p1-point3-p2-point3" aria-label="Permalink to &quot;***def*** \`__init__(self, p1: Point3, p2: Point3)\`&quot;"></a></h4><p><strong>説明</strong>: 三维空间中的线段。</p><p><strong>變數説明</strong>:</p><blockquote><ul><li>p1 (<a href="./point.html#class-point3"><code>Point3</code></a>): 线段的一个端点</li><li>p2 (<a href="./point.html#class-point3"><code>Point3</code></a>): 线段的另一个端点</li></ul></blockquote><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/segment.py#L14" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, p1: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, p2: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/segment.md","filePath":"en/api/mp_math/segment.md"}'),t={name:"en/api/mp_math/segment.md"},p=n(`<h1 id="mbcp-mp-math-segment" tabindex="-1">mbcp.mp_math.segment <a class="header-anchor" href="#mbcp-mp-math-segment" aria-label="Permalink to &quot;mbcp.mp_math.segment&quot;"></a></h1><p><strong>Description</strong>: 本模块定义了三维空间中的线段类</p><h3 id="class-segment3" tabindex="-1"><em><strong>class</strong></em> <code>Segment3</code> <a class="header-anchor" href="#class-segment3" aria-label="Permalink to &quot;***class*** \`Segment3\`&quot;"></a></h3><h4 id="func-init-self-p1-point3-p2-point3" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, p1: Point3, p2: Point3)</code> <a class="header-anchor" href="#func-init-self-p1-point3-p2-point3" aria-label="Permalink to &quot;***func*** \`__init__(self, p1: Point3, p2: Point3)\`&quot;"></a></h4><p><strong>Description</strong>: 三维空间中的线段。</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>p1 (<a href="./point.html#class-point3"><code>Point3</code></a>): 线段的一个端点</li><li>p2 (<a href="./point.html#class-point3"><code>Point3</code></a>): 线段的另一个端点</li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/segment.py#L14" target="_blank">View on 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, p1: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, p2: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -12,4 +12,4 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;长度&#39;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.length </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;">.direction.length</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;中心点&#39;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.midpoint </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3((</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p1.x </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;">.p2.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p1.y </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;">.p2.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p1.z </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;">.p2.z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details>`,8),h=[p];function l(e,k,r,d,E,g){return a(),i("div",null,h)}const c=s(t,[["render",l]]);export{F as __pageData,c as default};
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.midpoint </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3((</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p1.x </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;">.p2.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p1.y </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;">.p2.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p1.z </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;">.p2.z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details>`,8),h=[p];function l(e,k,r,d,o,E){return a(),i("div",null,h)}const F=s(t,[["render",l]]);export{c as __pageData,F as default};

View File

@ -1 +1 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/segment.md","filePath":"en/api/mp_math/segment.md"}'),t={name:"en/api/mp_math/segment.md"},p=n("",8),h=[p];function e(l,k,r,d,o,E){return a(),i("div",null,h)}const c=s(t,[["render",e]]);export{F as __pageData,c as default};
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/segment.md","filePath":"en/api/mp_math/segment.md"}'),t={name:"en/api/mp_math/segment.md"},p=n("",8),h=[p];function l(e,k,r,d,o,E){return a(),i("div",null,h)}const F=s(t,[["render",l]]);export{c as __pageData,F as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils","lastUpdated":false},"headers":[],"relativePath":"zht/api/mp_math/utils.md","filePath":"zht/api/mp_math/utils.md"}'),n={name:"zht/api/mp_math/utils.md"},l=t(`<h1 id="mbcp-mp-math-utils" tabindex="-1">mbcp.mp_math.utils <a class="header-anchor" href="#mbcp-mp-math-utils" aria-label="Permalink to &quot;mbcp.mp_math.utils&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了一些常用的工具函数</p><h3 id="def-clamp-x-float-min-float-max-float-float" tabindex="-1"><em><strong>def</strong></em> <code>clamp(x: float, min_: float, max_: float) -&gt; float</code> <a class="header-anchor" href="#def-clamp-x-float-min-float-max-float-float" aria-label="Permalink to &quot;***def*** \`clamp(x: float, min_: float, max_: float) -&gt; float\`&quot;"></a></h3><p><strong>説明</strong>: 区间限定函数</p><p><strong>變數説明</strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): 值</li><li>min_ (<code>float</code>): 最小值</li><li>max_ (<code>float</code>): 最大值</li></ul></blockquote><p><strong>返回</strong>: <code>float</code>: 限定在区间内的值</p><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L17" 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:#6F42C1;--shiki-dark:#B392F0;"> clamp</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, min_: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, max_: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/utils.md","filePath":"en/api/mp_math/utils.md"}'),t={name:"en/api/mp_math/utils.md"},l=n(`<h1 id="mbcp-mp-math-utils" tabindex="-1">mbcp.mp_math.utils <a class="header-anchor" href="#mbcp-mp-math-utils" aria-label="Permalink to &quot;mbcp.mp_math.utils&quot;"></a></h1><p><strong>Description</strong>: 本模块定义了一些常用的工具函数</p><h3 id="func-clamp-x-float-min-float-max-float-float" tabindex="-1"><em><strong>func</strong></em> <code>clamp(x: float, min_: float, max_: float) -&gt; float</code> <a class="header-anchor" href="#func-clamp-x-float-min-float-max-float-float" aria-label="Permalink to &quot;***func*** \`clamp(x: float, min_: float, max_: float) -&gt; float\`&quot;"></a></h3><p><strong>Description</strong>: 区间限定函数</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): 值</li><li>min_ (<code>float</code>): 最小值</li><li>max_ (<code>float</code>): 最大值</li></ul></blockquote><p><strong>Return</strong>: <code>float</code>: 限定在区间内的值</p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L17" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> clamp</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, min_: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, max_: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </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;"> &quot;&quot;&quot;</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>
@ -9,13 +9,13 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> \`float\`: 限定在区间内的值</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> max</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">min</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x, max_), min_)</span></span></code></pre></div></details><h3 id="class-approx" tabindex="-1"><em><strong>class</strong></em> <code>Approx</code> <a class="header-anchor" href="#class-approx" aria-label="Permalink to &quot;***class*** \`Approx\`&quot;"></a></h3><h4 id="def-init-self-value-realnumber" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, value: RealNumber)</code> <a class="header-anchor" href="#def-init-self-value-realnumber" aria-label="Permalink to &quot;***def*** \`__init__(self, value: RealNumber)\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>value (<a href="./mp_math_typing.html#realnumber"><code>RealNumber</code></a>): </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L36" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, value: RealNumber):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> max</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">min</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x, max_), min_)</span></span></code></pre></div></details><h3 id="class-approx" tabindex="-1"><em><strong>class</strong></em> <code>Approx</code> <a class="header-anchor" href="#class-approx" aria-label="Permalink to &quot;***class*** \`Approx\`&quot;"></a></h3><h4 id="func-init-self-value-realnumber" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, value: RealNumber)</code> <a class="header-anchor" href="#func-init-self-value-realnumber" aria-label="Permalink to &quot;***func*** \`__init__(self, value: RealNumber)\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>value (<a href="./mp_math_typing.html#realnumber"><code>RealNumber</code></a>): </li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L36" target="_blank">View on 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, value: RealNumber):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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 ([\`RealNumber\`](./mp_math_typing#realnumber)): 实数</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> value</span></span></code></pre></div></details><h4 id="def-eq-self-other" tabindex="-1"><em><strong>def</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#def-eq-self-other" aria-label="Permalink to &quot;***def*** \`__eq__(self, other)\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L44" 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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> value</span></span></code></pre></div></details><h4 id="func-eq-self-other" tabindex="-1"><em><strong>func</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#func-eq-self-other" aria-label="Permalink to &quot;***func*** \`__eq__(self, other)\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L44" target="_blank">View on 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;"> if</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value, (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">int</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)):</span></span>
<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, (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">int</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:#005CC5;--shiki-dark:#79B8FF;"> abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> APPROX</span></span>
@ -25,9 +25,9 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F
<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, (Vector3, Point3, Plane3, Line3)):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> all</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;">.value.x, other.x), approx(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value.y, other.y), approx(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value.z, other.z)])</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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.raise_type_error(other)</span></span></code></pre></div></details><h4 id="def-raise-type-error-self-other" tabindex="-1"><em><strong>def</strong></em> <code>raise_type_error(self, other)</code> <a class="header-anchor" href="#def-raise-type-error-self-other" aria-label="Permalink to &quot;***def*** \`raise_type_error(self, other)\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L56" 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:#6F42C1;--shiki-dark:#B392F0;"> raise_type_error</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> and </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-ne-self-other" tabindex="-1"><em><strong>def</strong></em> <code>__ne__(self, other)</code> <a class="header-anchor" href="#def-ne-self-other" aria-label="Permalink to &quot;***def*** \`__ne__(self, other)\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L59" 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;"> __ne__</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:#D73A49;--shiki-dark:#F97583;"> not</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">__eq__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span></span></code></pre></div></details><h3 id="def-approx-x-float-y-float-0-0-epsilon-float-approx-bool" tabindex="-1"><em><strong>def</strong></em> <code>approx(x: float, y: float = 0.0, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#def-approx-x-float-y-float-0-0-epsilon-float-approx-bool" aria-label="Permalink to &quot;***def*** \`approx(x: float, y: float = 0.0, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h3><p><strong></strong>: 0</p><p><strong></strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): 1</li><li>y (<code>float</code>): 2</li><li>epsilon (<code>float</code>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L63" 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.raise_type_error(other)</span></span></code></pre></div></details><h4 id="func-raise-type-error-self-other" tabindex="-1"><em><strong>func</strong></em> <code>raise_type_error(self, other)</code> <a class="header-anchor" href="#func-raise-type-error-self-other" aria-label="Permalink to &quot;***func*** \`raise_type_error(self, other)\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L56" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> raise_type_error</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> and </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-ne-self-other" tabindex="-1"><em><strong>func</strong></em> <code>__ne__(self, other)</code> <a class="header-anchor" href="#func-ne-self-other" aria-label="Permalink to &quot;***func*** \`__ne__(self, other)\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L59" target="_blank">View on 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;"> __ne__</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:#D73A49;--shiki-dark:#F97583;"> not</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">__eq__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span></span></code></pre></div></details><h3 id="func-approx-x-float-y-float-0-0-epsilon-float-approx-bool" tabindex="-1"><em><strong>func</strong></em> <code>approx(x: float, y: float = 0.0, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#func-approx-x-float-y-float-0-0-epsilon-float-approx-bool" aria-label="Permalink to &quot;***func*** \`approx(x: float, y: float = 0.0, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h3><p><strong>Description</strong>: 0</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): 1</li><li>y (<code>float</code>): 2</li><li>epsilon (<code>float</code>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L63" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 判断两个数是否近似相等或包装一个实数用于判断是否近似于0</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -37,7 +37,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https://docs.python.org/3/library/functions.html#bool): 是否近似相等</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon</span></span></code></pre></div></details><h3 id="def-sign-x-float-only-neg-bool-false-str" tabindex="-1"><em><strong>def</strong></em> <code>sign(x: float, only_neg: bool = False) -&gt; str</code> <a class="header-anchor" href="#def-sign-x-float-only-neg-bool-false-str" aria-label="Permalink to &quot;***def*** \`sign(x: float, only_neg: bool = False) -&gt; str\`&quot;"></a></h3><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li><li>only_neg (<a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#str" target="_blank" rel="noreferrer"><code>str</code></a>: + - &quot;&quot;</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L76" 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:#6F42C1;--shiki-dark:#B392F0;"> sign</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, only_neg: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">False</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</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:#005CC5;--shiki-dark:#79B8FF;"> abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon</span></span></code></pre></div></details><h3 id="func-sign-x-float-only-neg-bool-false-str" tabindex="-1"><em><strong>func</strong></em> <code>sign(x: float, only_neg: bool = False) -&gt; str</code> <a class="header-anchor" href="#func-sign-x-float-only-neg-bool-false-str" aria-label="Permalink to &quot;***func*** \`sign(x: float, only_neg: bool = False) -&gt; str\`&quot;"></a></h3><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li><li>only_neg (<a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#str" target="_blank" rel="noreferrer"><code>str</code></a>: + - &quot;&quot;</p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L76" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> sign</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, only_neg: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">False</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;获取数的符号</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;"> x ([\`float\`](https://docs.python.org/3/library/functions.html#float)): 数</span></span>
@ -50,7 +50,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</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:#032F62;--shiki-dark:#9ECBFF;"> &#39;-&#39;</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;&#39;</span></span></code></pre></div></details><h3 id="def-sign-format-x-float-only-neg-bool-false-str" tabindex="-1"><em><strong>def</strong></em> <code>sign_format(x: float, only_neg: bool = False) -&gt; str</code> <a class="header-anchor" href="#def-sign-format-x-float-only-neg-bool-false-str" aria-label="Permalink to &quot;***def*** \`sign_format(x: float, only_neg: bool = False) -&gt; str\`&quot;"></a></h3><p><strong></strong>: -1 -&gt; -1 1 -&gt; +1 0 -&gt; &quot;&quot;</p><p><strong></strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li><li>only_neg (<a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#str" target="_blank" rel="noreferrer"><code>str</code></a>: + - &quot;&quot;</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L92" 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:#6F42C1;--shiki-dark:#B392F0;"> sign_format</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, only_neg: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">False</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</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:#032F62;--shiki-dark:#9ECBFF;"> &#39;&#39;</span></span></code></pre></div></details><h3 id="func-sign-format-x-float-only-neg-bool-false-str" tabindex="-1"><em><strong>func</strong></em> <code>sign_format(x: float, only_neg: bool = False) -&gt; str</code> <a class="header-anchor" href="#func-sign-format-x-float-only-neg-bool-false-str" aria-label="Permalink to &quot;***func*** \`sign_format(x: float, only_neg: bool = False) -&gt; str\`&quot;"></a></h3><p><strong>Description</strong>: -1 -&gt; -1 1 -&gt; +1 0 -&gt; &quot;&quot;</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li><li>only_neg (<a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#str" target="_blank" rel="noreferrer"><code>str</code></a>: + - &quot;&quot;</p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L92" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> sign_format</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, only_neg: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">False</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;格式化符号数</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> -1 -&gt; -1</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 1 -&gt; +1</span></span>
@ -66,4 +66,4 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</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:#D73A49;--shiki-dark:#F97583;"> f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;-</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;&#39;</span></span></code></pre></div></details>`,38),h=[l];function e(p,k,r,o,d,g){return a(),i("div",null,h)}const E=s(n,[["render",e]]);export{F as __pageData,E as default};
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;&#39;</span></span></code></pre></div></details>`,38),h=[l];function e(p,k,r,o,d,g){return a(),i("div",null,h)}const F=s(t,[["render",e]]);export{c as __pageData,F as default};

View File

@ -0,0 +1 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/utils.md","filePath":"en/api/mp_math/utils.md"}'),t={name:"en/api/mp_math/utils.md"},l=n("",38),h=[l];function e(p,k,r,o,d,g){return a(),i("div",null,h)}const F=s(t,[["render",e]]);export{c as __pageData,F as default};

View File

@ -1 +0,0 @@
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/utils.md","filePath":"en/api/mp_math/utils.md"}'),n={name:"en/api/mp_math/utils.md"},l=t("",38),h=[l];function e(p,k,r,o,d,g){return a(),i("div",null,h)}const E=s(n,[["render",e]]);export{F as __pageData,E as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/vector.md","filePath":"en/api/mp_math/vector.md"}'),n={name:"en/api/mp_math/vector.md"},e=t(`<h1 id="mbcp-mp-math-vector" tabindex="-1">mbcp.mp_math.vector <a class="header-anchor" href="#mbcp-mp-math-vector" aria-label="Permalink to &quot;mbcp.mp_math.vector&quot;"></a></h1><p><strong>Description</strong>: 本模块定义了3维向量的类Vector3以及一些常用的向量。</p><h3 id="class-vector3" tabindex="-1"><em><strong>class</strong></em> <code>Vector3</code> <a class="header-anchor" href="#class-vector3" aria-label="Permalink to &quot;***class*** \`Vector3\`&quot;"></a></h3><h4 id="def-init-self-x-float-y-float-z-float" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, x: float, y: float, z: float)</code> <a class="header-anchor" href="#def-init-self-x-float-y-float-z-float" aria-label="Permalink to &quot;***def*** \`__init__(self, x: float, y: float, z: float)\`&quot;"></a></h4><p><strong>Description</strong>: 3维向量</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): x轴分量</li><li>y (<code>float</code>): y轴分量</li><li>z (<code>float</code>): z轴分量</li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L18" target="_blank">View on 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, z: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/vector.md","filePath":"en/api/mp_math/vector.md"}'),n={name:"en/api/mp_math/vector.md"},e=t(`<h1 id="mbcp-mp-math-vector" tabindex="-1">mbcp.mp_math.vector <a class="header-anchor" href="#mbcp-mp-math-vector" aria-label="Permalink to &quot;mbcp.mp_math.vector&quot;"></a></h1><p><strong>Description</strong>: 本模块定义了3维向量的类Vector3以及一些常用的向量。</p><h3 id="class-vector3" tabindex="-1"><em><strong>class</strong></em> <code>Vector3</code> <a class="header-anchor" href="#class-vector3" aria-label="Permalink to &quot;***class*** \`Vector3\`&quot;"></a></h3><h4 id="func-init-self-x-float-y-float-z-float" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, x: float, y: float, z: float)</code> <a class="header-anchor" href="#func-init-self-x-float-y-float-z-float" aria-label="Permalink to &quot;***func*** \`__init__(self, x: float, y: float, z: float)\`&quot;"></a></h4><p><strong>Description</strong>: 3维向量</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): x轴分量</li><li>y (<code>float</code>): y轴分量</li><li>z (<code>float</code>): z轴分量</li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L18" target="_blank">View on 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, z: </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;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 3维向量</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -8,7 +8,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> y</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> z</span></span></code></pre></div></details><h4 id="def-approx-self-other-vector3-epsilon-float-approx-bool" tabindex="-1"><em><strong>def</strong></em> <code>approx(self, other: Vector3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#def-approx-self-other-vector3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***def*** \`approx(self, other: Vector3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L30" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> z</span></span></code></pre></div></details><h4 id="func-approx-self-other-vector3-epsilon-float-approx-bool" tabindex="-1"><em><strong>func</strong></em> <code>approx(self, other: Vector3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#func-approx-self-other-vector3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***func*** \`approx(self, other: Vector3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L30" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -18,7 +18,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否近似相等</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> all</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon])</span></span></code></pre></div></details><h4 id="def-cal-angle-self-other-vector3-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>cal_angle(self, other: Vector3) -&gt; AnyAngle</code> <a class="header-anchor" href="#def-cal-angle-self-other-vector3-anyangle" aria-label="Permalink to &quot;***def*** \`cal_angle(self, other: Vector3) -&gt; AnyAngle\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="./angle.html#class-anyangle"><code>AnyAngle</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L42" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> cal_angle</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> all</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon])</span></span></code></pre></div></details><h4 id="func-cal-angle-self-other-vector3-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>cal_angle(self, other: Vector3) -&gt; AnyAngle</code> <a class="header-anchor" href="#func-cal-angle-self-other-vector3-anyangle" aria-label="Permalink to &quot;***func*** \`cal_angle(self, other: Vector3) -&gt; AnyAngle\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="./angle.html#class-anyangle"><code>AnyAngle</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L42" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> cal_angle</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -26,7 +26,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`AnyAngle\`](./angle#class-anyangle): 夹角</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> AnyAngle(math.acos(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> @</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other </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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.length </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.length)), </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="def-cross-self-other-vector3-vector3" tabindex="-1"><em><strong>def</strong></em> <code>cross(self, other: Vector3) -&gt; Vector3</code> <a class="header-anchor" href="#def-cross-self-other-vector3-vector3" aria-label="Permalink to &quot;***def*** \`cross(self, other: Vector3) -&gt; Vector3\`&quot;"></a></h4><p><strong>Description</strong>: v1 cross v2 -&gt; v3</p><p>0 </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="#class-vector3"><code>Vector3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L52" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> cross</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</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(math.acos(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> @</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other </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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.length </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.length)), </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="func-cross-self-other-vector3-vector3" tabindex="-1"><em><strong>func</strong></em> <code>cross(self, other: Vector3) -&gt; Vector3</code> <a class="header-anchor" href="#func-cross-self-other-vector3-vector3" aria-label="Permalink to &quot;***func*** \`cross(self, other: Vector3) -&gt; Vector3\`&quot;"></a></h4><p><strong>Description</strong>: v1 cross v2 -&gt; v3</p><p>0 </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="#class-vector3"><code>Vector3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L52" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> cross</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 向量积 叉乘v1 cross v2 -&gt; v3</span></span>
<span class="line"></span>
@ -46,7 +46,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`Vector3\`](#class-vector3): 叉乘结果</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z </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;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x </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;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y </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;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x)</span></span></code></pre></div></details><h4 id="def-is-approx-parallel-self-other-vector3-epsilon-float-approx-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#def-is-approx-parallel-self-other-vector3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***def*** \`is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L76" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> is_approx_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z </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;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x </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;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y </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;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x)</span></span></code></pre></div></details><h4 id="func-is-approx-parallel-self-other-vector3-epsilon-float-approx-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#func-is-approx-parallel-self-other-vector3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***func*** \`is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L76" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> is_approx_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -55,7 +55,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否近似平行</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.cross(other).length </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon</span></span></code></pre></div></details><h4 id="def-is-parallel-self-other-vector3-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_parallel(self, other: Vector3) -&gt; bool</code> <a class="header-anchor" href="#def-is-parallel-self-other-vector3-bool" aria-label="Permalink to &quot;***def*** \`is_parallel(self, other: Vector3) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L87" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> is_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.cross(other).length </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon</span></span></code></pre></div></details><h4 id="func-is-parallel-self-other-vector3-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_parallel(self, other: Vector3) -&gt; bool</code> <a class="header-anchor" href="#func-is-parallel-self-other-vector3-bool" aria-label="Permalink to &quot;***func*** \`is_parallel(self, other: Vector3) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L87" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> is_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -63,7 +63,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否平行</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.cross(other).approx(zero_vector3)</span></span></code></pre></div></details><h4 id="def-normalize-self" tabindex="-1"><em><strong>def</strong></em> <code>normalize(self)</code> <a class="header-anchor" href="#def-normalize-self" aria-label="Permalink to &quot;***def*** \`normalize(self)\`&quot;"></a></h4><p><strong>Description</strong>: </p><p></p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L97" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> normalize</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.cross(other).approx(zero_vector3)</span></span></code></pre></div></details><h4 id="func-normalize-self" tabindex="-1"><em><strong>func</strong></em> <code>normalize(self)</code> <a class="header-anchor" href="#func-normalize-self" aria-label="Permalink to &quot;***func*** \`normalize(self)\`&quot;"></a></h4><p><strong>Description</strong>: </p><p></p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L97" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> normalize</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 将向量归一化</span></span>
<span class="line"></span>
@ -72,33 +72,33 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> length </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;">.length</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> length</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> length</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> length</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="def-np-array-self-np-ndarray" tabindex="-1"><em><strong>def</strong></em> <code>np_array(self) -&gt; np.ndarray</code> <a class="header-anchor" href="#def-np-array-self-np-ndarray" aria-label="Permalink to &quot;***def*** \`np_array(self) -&gt; np.ndarray\`&quot;"></a></h4><p><strong>Return</strong>: <a href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html" target="_blank" rel="noreferrer"><code>np.ndarray</code></a>: numpy</p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L109" target="_blank">View on 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> length</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="func-np-array-self-np-ndarray" tabindex="-1"><em><strong>func</strong></em> <code>np_array(self) -&gt; np.ndarray</code> <a class="header-anchor" href="#func-np-array-self-np-ndarray" aria-label="Permalink to &quot;***func*** \`np_array(self) -&gt; np.ndarray\`&quot;"></a></h4><p><strong>Return</strong>: <a href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html" target="_blank" rel="noreferrer"><code>np.ndarray</code></a>: numpy</p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L109" target="_blank">View on 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> np_array</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;np.ndarray&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 返回numpy数组</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;"> [\`np.ndarray\`](https%3A//numpy.org/doc/stable/reference/generated/numpy.ndarray.html): numpy数组</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> np.array([</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z])</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="def-length-self-float" tabindex="-1"><em><strong>def</strong></em> <code>length(self) -&gt; float</code> <a class="header-anchor" href="#def-length-self-float" aria-label="Permalink to &quot;***def*** \`length(self) -&gt; float\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L119" target="_blank">View on 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> np.array([</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z])</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="func-length-self-float" tabindex="-1"><em><strong>func</strong></em> <code>length(self) -&gt; float</code> <a class="header-anchor" href="#func-length-self-float" aria-label="Permalink to &quot;***func*** \`length(self) -&gt; float\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L119" target="_blank">View on 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> length</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; </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;"> &quot;&quot;&quot;</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;"> [\`float\`](https%3A//docs.python.org/3/library/functions.html#float): 模</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> math.sqrt(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </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;">.y </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;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">**</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</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="def-unit-self-vector3" tabindex="-1"><em><strong>def</strong></em> <code>unit(self) -&gt; Vector3</code> <a class="header-anchor" href="#def-unit-self-vector3" aria-label="Permalink to &quot;***def*** \`unit(self) -&gt; Vector3\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Return</strong>: <a href="#class-vector3"><code>Vector3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L128" target="_blank">View on 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> math.sqrt(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </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;">.y </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;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">**</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</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="func-unit-self-vector3" tabindex="-1"><em><strong>func</strong></em> <code>unit(self) -&gt; Vector3</code> <a class="header-anchor" href="#func-unit-self-vector3" aria-label="Permalink to &quot;***func*** \`unit(self) -&gt; Vector3\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Return</strong>: <a href="#class-vector3"><code>Vector3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L128" target="_blank">View on 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> unit</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> [\`Vector3\`](#class-vector3): 单位向量</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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:#D73A49;--shiki-dark:#F97583;"> /</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.length</span></span></code></pre></div></details><h4 id="def-abs-self" tabindex="-1"><em><strong>def</strong></em> <code>__abs__(self)</code> <a class="header-anchor" href="#def-abs-self" aria-label="Permalink to &quot;***def*** \`__abs__(self)\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L136" target="_blank">View on 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;"> __abs__</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.length</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-vector3-vector3" tabindex="-1"><em><strong>def</strong></em> <code>self + other: Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-vector3-vector3" aria-label="Permalink to &quot;***def*** \`self + other: Vector3 =&gt; Vector3\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L140" target="_blank">View on 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>
<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:#D73A49;--shiki-dark:#F97583;"> /</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.length</span></span></code></pre></div></details><h4 id="func-abs-self" tabindex="-1"><em><strong>func</strong></em> <code>__abs__(self)</code> <a class="header-anchor" href="#func-abs-self" aria-label="Permalink to &quot;***func*** \`__abs__(self)\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L136" target="_blank">View on 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;"> __abs__</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.length</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-vector3-vector3" tabindex="-1"><em><strong>func</strong></em> <code>self + other: Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-vector3-vector3" aria-label="Permalink to &quot;***func*** \`self + other: Vector3 =&gt; Vector3\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L140" target="_blank">View on 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>
<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;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-point3-point3" tabindex="-1"><em><strong>def</strong></em> <code>self + other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#def-self-other-point3-point3" aria-label="Permalink to &quot;***def*** \`self + other: Point3 =&gt; Point3\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L144" target="_blank">View on 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-point3-point3" tabindex="-1"><em><strong>func</strong></em> <code>self + other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#func-self-other-point3-point3" aria-label="Permalink to &quot;***func*** \`self + other: Point3 =&gt; Point3\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L144" target="_blank">View on 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>
<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;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="def-self-other" tabindex="-1"><em><strong>def</strong></em> <code>self + other</code> <a class="header-anchor" href="#def-self-other" aria-label="Permalink to &quot;***def*** \`self + other\`&quot;"></a></h4><p><strong>Description</strong>: V + P -&gt; P</p><p>V + V -&gt; V</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L147" target="_blank">View on 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="func-self-other" tabindex="-1"><em><strong>func</strong></em> <code>self + other</code> <a class="header-anchor" href="#func-self-other" aria-label="Permalink to &quot;***func*** \`self + other\`&quot;"></a></h4><p><strong>Description</strong>: V + P -&gt; P</p><p>V + V -&gt; V</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L147" target="_blank">View on 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>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> V + P -&gt; P</span></span>
<span class="line"></span>
@ -113,7 +113,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other, Point3):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for +: &#39;Vector3&#39; and &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-eq-self-other" tabindex="-1"><em><strong>def</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#def-eq-self-other" aria-label="Permalink to &quot;***def*** \`__eq__(self, other)\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L163" target="_blank">View on 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;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for +: &#39;Vector3&#39; and &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-eq-self-other" tabindex="-1"><em><strong>func</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#func-eq-self-other" aria-label="Permalink to &quot;***func*** \`__eq__(self, other)\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L163" target="_blank">View on 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:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -121,7 +121,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否相等</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.x, other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.y, other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.z, other.z)</span></span></code></pre></div></details><h4 id="def-self-other-point3-point3-1" tabindex="-1"><em><strong>def</strong></em> <code>self + other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#def-self-other-point3-point3-1" aria-label="Permalink to &quot;***def*** \`self + other: Point3 =&gt; Point3\`&quot;"></a></h4><p><strong>Description</strong>: P + V -&gt; P</p><p></p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L173" target="_blank">View on 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;"> __radd__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</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;"> approx(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x, other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.y, other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.z, other.z)</span></span></code></pre></div></details><h4 id="func-self-other-point3-point3-1" tabindex="-1"><em><strong>func</strong></em> <code>self + other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#func-self-other-point3-point3-1" aria-label="Permalink to &quot;***func*** \`self + other: Point3 =&gt; Point3\`&quot;"></a></h4><p><strong>Description</strong>: P + V -&gt; P</p><p></p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L173" target="_blank">View on 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;"> __radd__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> P + V -&gt; P</span></span>
<span class="line"></span>
@ -131,11 +131,11 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`Point3\`](./point#class-point3): 新的点</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-vector3-vector3-1" tabindex="-1"><em><strong>def</strong></em> <code>self - other: Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-vector3-vector3-1" aria-label="Permalink to &quot;***def*** \`self - other: Vector3 =&gt; Vector3\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L185" target="_blank">View on 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-vector3-vector3-1" tabindex="-1"><em><strong>func</strong></em> <code>self - other: Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-vector3-vector3-1" aria-label="Permalink to &quot;***func*** \`self - other: Vector3 =&gt; Vector3\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L185" target="_blank">View on 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>
<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;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-point3-point3-2" tabindex="-1"><em><strong>def</strong></em> <code>self - other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#def-self-other-point3-point3-2" aria-label="Permalink to &quot;***def*** \`self - other: Point3 =&gt; Point3\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L189" target="_blank">View on 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-point3-point3-2" tabindex="-1"><em><strong>func</strong></em> <code>self - other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#func-self-other-point3-point3-2" aria-label="Permalink to &quot;***func*** \`self - other: Point3 =&gt; Point3\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L189" target="_blank">View on 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>
<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;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="def-self-other-1" tabindex="-1"><em><strong>def</strong></em> <code>self - other</code> <a class="header-anchor" href="#def-self-other-1" aria-label="Permalink to &quot;***def*** \`self - other\`&quot;"></a></h4><p><strong>Description</strong>: V - P -&gt; P</p><p>V - V -&gt; V</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L192" target="_blank">View on 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="func-self-other-1" tabindex="-1"><em><strong>func</strong></em> <code>self - other</code> <a class="header-anchor" href="#func-self-other-1" aria-label="Permalink to &quot;***func*** \`self - other\`&quot;"></a></h4><p><strong>Description</strong>: V - P -&gt; P</p><p>V - V -&gt; V</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L192" target="_blank">View on 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>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> V - P -&gt; P</span></span>
<span class="line"></span>
@ -150,7 +150,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other, Point3):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;unsupported operand type(s) for -: &quot;Vector3&quot; and &quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-self-other-point3" tabindex="-1"><em><strong>def</strong></em> <code>self - other: Point3</code> <a class="header-anchor" href="#def-self-other-point3" aria-label="Permalink to &quot;***def*** \`self - other: Point3\`&quot;"></a></h4><p><strong>Description</strong>: P - V -&gt; P</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L208" target="_blank">View on 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;"> __rsub__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;unsupported operand type(s) for -: &quot;Vector3&quot; and &quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-self-other-point3" tabindex="-1"><em><strong>func</strong></em> <code>self - other: Point3</code> <a class="header-anchor" href="#func-self-other-point3" aria-label="Permalink to &quot;***func*** \`self - other: Point3\`&quot;"></a></h4><p><strong>Description</strong>: P - V -&gt; P</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L208" target="_blank">View on 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;"> __rsub__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> P - V -&gt; P</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -161,11 +161,11 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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, Point3):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(other.x </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;">.x, other.y </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;">.y, other.z </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;">.z)</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for -: &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39; and &#39;Vector3&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-vector3-vector3-2" tabindex="-1"><em><strong>def</strong></em> <code>self * other: Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-vector3-vector3-2" aria-label="Permalink to &quot;***def*** \`self * other: Vector3 =&gt; Vector3\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L223" target="_blank">View on 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for -: &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39; and &#39;Vector3&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-vector3-vector3-2" tabindex="-1"><em><strong>func</strong></em> <code>self * other: Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-vector3-vector3-2" aria-label="Permalink to &quot;***func*** \`self * other: Vector3 =&gt; Vector3\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L223" target="_blank">View on 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>
<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:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-realnumber-vector3" tabindex="-1"><em><strong>def</strong></em> <code>self * other: RealNumber =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-realnumber-vector3" aria-label="Permalink to &quot;***def*** \`self * other: RealNumber =&gt; Vector3\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L227" target="_blank">View on 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-realnumber-vector3" tabindex="-1"><em><strong>func</strong></em> <code>self * other: RealNumber =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-realnumber-vector3" aria-label="Permalink to &quot;***func*** \`self * other: RealNumber =&gt; Vector3\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L227" target="_blank">View on 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>
<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: RealNumber) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="def-self-other-int-float-vector3-vector3" tabindex="-1"><em><strong>def</strong></em> <code>self * other: int | float | Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-int-float-vector3-vector3" aria-label="Permalink to &quot;***def*** \`self * other: int | float | Vector3 =&gt; Vector3\`&quot;"></a></h4><p><strong>Description</strong>: 使@使cross</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a> | <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="#class-vector"><code>Vector3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L230" target="_blank">View on 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:#032F62;--shiki-dark:#9ECBFF;">&#39;int | float | Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="func-self-other-int-float-vector3-vector3" tabindex="-1"><em><strong>func</strong></em> <code>self * other: int | float | Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-int-float-vector3-vector3" aria-label="Permalink to &quot;***func*** \`self * other: int | float | Vector3 =&gt; Vector3\`&quot;"></a></h4><p><strong>Description</strong>: 使@使cross</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a> | <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="#class-vector"><code>Vector3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L230" target="_blank">View on 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:#032F62;--shiki-dark:#9ECBFF;">&#39;int | float | Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 数组运算 非点乘点乘使用@叉乘使用cross</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -178,8 +178,8 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(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:#005CC5;--shiki-dark:#79B8FF;">int</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;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other)</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for *: &#39;Vector3&#39; and &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-self-other-realnumber-vector3-1" tabindex="-1"><em><strong>def</strong></em> <code>self * other: RealNumber =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-realnumber-vector3-1" aria-label="Permalink to &quot;***def*** \`self * other: RealNumber =&gt; Vector3\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L246" target="_blank">View on 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;"> __rmul__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;RealNumber&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">__mul__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span></span></code></pre></div></details><h4 id="def-self-other-vector3-realnumber" tabindex="-1"><em><strong>def</strong></em> <code>self @ other: Vector3 =&gt; RealNumber</code> <a class="header-anchor" href="#def-self-other-vector3-realnumber" aria-label="Permalink to &quot;***def*** \`self @ other: Vector3 =&gt; RealNumber\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L249" target="_blank">View on 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;"> __matmul__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;RealNumber&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for *: &#39;Vector3&#39; and &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-self-other-realnumber-vector3-1" tabindex="-1"><em><strong>func</strong></em> <code>self * other: RealNumber =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-realnumber-vector3-1" aria-label="Permalink to &quot;***func*** \`self * other: RealNumber =&gt; Vector3\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L246" target="_blank">View on 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;"> __rmul__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;RealNumber&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">__mul__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span></span></code></pre></div></details><h4 id="func-self-other-vector3-realnumber" tabindex="-1"><em><strong>func</strong></em> <code>self @ other: Vector3 =&gt; RealNumber</code> <a class="header-anchor" href="#func-self-other-vector3-realnumber" aria-label="Permalink to &quot;***func*** \`self @ other: Vector3 =&gt; RealNumber\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L249" target="_blank">View on 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;"> __matmul__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;RealNumber&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -187,11 +187,11 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`float\`](https%3A//docs.python.org/3/library/functions.html#float): 点乘结果</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x </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;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y </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;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z</span></span></code></pre></div></details><h4 id="def-self-other-realnumber-vector3-2" tabindex="-1"><em><strong>def</strong></em> <code>self / other: RealNumber =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-realnumber-vector3-2" aria-label="Permalink to &quot;***def*** \`self / other: RealNumber =&gt; Vector3\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L259" target="_blank">View on 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: RealNumber) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</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;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other)</span></span></code></pre></div></details><h4 id="def-self-vector3" tabindex="-1"><em><strong>def</strong></em> <code>- self =&gt; Vector3</code> <a class="header-anchor" href="#def-self-vector3" aria-label="Permalink to &quot;***def*** \`- self =&gt; Vector3\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Return</strong>: <a href="#class-vector3"><code>Vector3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L262" target="_blank">View on 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;"> __neg__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x </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;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y </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;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z</span></span></code></pre></div></details><h4 id="func-self-other-realnumber-vector3-2" tabindex="-1"><em><strong>func</strong></em> <code>self / other: RealNumber =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-realnumber-vector3-2" aria-label="Permalink to &quot;***func*** \`self / other: RealNumber =&gt; Vector3\`&quot;"></a></h4><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L259" target="_blank">View on 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: RealNumber) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</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;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other)</span></span></code></pre></div></details><h4 id="func-self-vector3" tabindex="-1"><em><strong>func</strong></em> <code>- self =&gt; Vector3</code> <a class="header-anchor" href="#func-self-vector3" aria-label="Permalink to &quot;***func*** \`- self =&gt; Vector3\`&quot;"></a></h4><p><strong>Description</strong>: </p><p><strong>Return</strong>: <a href="#class-vector3"><code>Vector3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L262" target="_blank">View on 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;"> __neg__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> [\`Vector3\`](#class-vector3): 负向量</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</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;">.x, </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;">.y, </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;">.z)</span></span></code></pre></div></details><h3 id="var-zero-vector3" tabindex="-1">var <code>zero_vector3</code> <a class="header-anchor" href="#var-zero-vector3" aria-label="Permalink to &quot;var \`zero_vector3\`&quot;"></a></h3><ul><li><p><strong>Description</strong>: </p></li><li><p><strong>Type</strong>: <code>Vector3</code></p></li><li><p><strong>Default</strong>: <code>Vector3(0, 0, 0)</code></p></li></ul><h3 id="var-x-axis" tabindex="-1">var <code>x_axis</code> <a class="header-anchor" href="#var-x-axis" aria-label="Permalink to &quot;var \`x_axis\`&quot;"></a></h3><ul><li><p><strong>Description</strong>: x</p></li><li><p><strong>Type</strong>: <code>Vector3</code></p></li><li><p><strong>Default</strong>: <code>Vector3(1, 0, 0)</code></p></li></ul><h3 id="var-y-axis" tabindex="-1">var <code>y_axis</code> <a class="header-anchor" href="#var-y-axis" aria-label="Permalink to &quot;var \`y_axis\`&quot;"></a></h3><ul><li><p><strong>Description</strong>: y</p></li><li><p><strong>Type</strong>: <code>Vector3</code></p></li><li><p><strong>Default</strong>: <code>Vector3(0, 1, 0)</code></p></li></ul><h3 id="var-z-axis" tabindex="-1">var <code>z_axis</code> <a class="header-anchor" href="#var-z-axis" aria-label="Permalink to &quot;var \`z_axis\`&quot;"></a></h3><ul><li><p><strong>Description</strong>: z</p></li><li><p><strong>Type</strong>: <code>Vector3</code></p></li><li><p><strong>Default</strong>: <code>Vector3(0, 0, 1)</code></p></li></ul>`,138),l=[e];function h(p,k,r,o,d,g){return a(),i("div",null,l)}const y=s(n,[["render",h]]);export{E as __pageData,y as default};
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</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;">.x, </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;">.y, </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;">.z)</span></span></code></pre></div></details><h3 id="var-zero-vector3" tabindex="-1">var <code>zero_vector3</code> <a class="header-anchor" href="#var-zero-vector3" aria-label="Permalink to &quot;var \`zero_vector3\`&quot;"></a></h3><ul><li><p><strong>Description</strong>: </p></li><li><p><strong>Type</strong>: <code>Vector3</code></p></li><li><p><strong>Default</strong>: <code>Vector3(0, 0, 0)</code></p></li></ul><h3 id="var-x-axis" tabindex="-1">var <code>x_axis</code> <a class="header-anchor" href="#var-x-axis" aria-label="Permalink to &quot;var \`x_axis\`&quot;"></a></h3><ul><li><p><strong>Description</strong>: x</p></li><li><p><strong>Type</strong>: <code>Vector3</code></p></li><li><p><strong>Default</strong>: <code>Vector3(1, 0, 0)</code></p></li></ul><h3 id="var-y-axis" tabindex="-1">var <code>y_axis</code> <a class="header-anchor" href="#var-y-axis" aria-label="Permalink to &quot;var \`y_axis\`&quot;"></a></h3><ul><li><p><strong>Description</strong>: y</p></li><li><p><strong>Type</strong>: <code>Vector3</code></p></li><li><p><strong>Default</strong>: <code>Vector3(0, 1, 0)</code></p></li></ul><h3 id="var-z-axis" tabindex="-1">var <code>z_axis</code> <a class="header-anchor" href="#var-z-axis" aria-label="Permalink to &quot;var \`z_axis\`&quot;"></a></h3><ul><li><p><strong>Description</strong>: z</p></li><li><p><strong>Type</strong>: <code>Vector3</code></p></li><li><p><strong>Default</strong>: <code>Vector3(0, 0, 1)</code></p></li></ul>`,138),l=[e];function h(p,k,r,o,d,c){return a(),i("div",null,l)}const y=s(n,[["render",h]]);export{E as __pageData,y as default};

View File

@ -1 +1 @@
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/vector.md","filePath":"en/api/mp_math/vector.md"}'),n={name:"en/api/mp_math/vector.md"},e=t("",138),l=[e];function h(p,k,r,o,d,g){return a(),i("div",null,l)}const y=s(n,[["render",h]]);export{E as __pageData,y as default};
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/vector.md","filePath":"en/api/mp_math/vector.md"}'),n={name:"en/api/mp_math/vector.md"},e=t("",138),l=[e];function h(p,k,r,o,d,c){return a(),i("div",null,l)}const y=s(n,[["render",h]]);export{E as __pageData,y as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"en/api/presets/model/index.md","filePath":"en/api/presets/model/index.md"}'),t={name:"en/api/presets/model/index.md"},h=n(`<h1 id="mbcp-presets-model" tabindex="-1">mbcp.presets.model <a class="header-anchor" href="#mbcp-presets-model" aria-label="Permalink to &quot;mbcp.presets.model&quot;"></a></h1><p><strong>Description</strong>: 几何模型点集</p><h3 id="class-geometricmodels" tabindex="-1"><em><strong>class</strong></em> <code>GeometricModels</code> <a class="header-anchor" href="#class-geometricmodels" aria-label="Permalink to &quot;***class*** \`GeometricModels\`&quot;"></a></h3><p><a href="https://docs.python.org/3/library/functions.html#staticmethod" target="_blank" rel="noreferrer"><code>@staticmethod</code></a></p><h4 id="def-sphere-radius-float-density-float" tabindex="-1"><em><strong>def</strong></em> <code>sphere(radius: float, density: float)</code> <a class="header-anchor" href="#def-sphere-radius-float-density-float" aria-label="Permalink to &quot;***def*** \`sphere(radius: float, density: float)\`&quot;"></a></h4><p><strong>Description</strong>: 生成球体上的点集。</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>radius:</li><li>density:</li></ul></blockquote><p><strong>Return</strong>: List[Point3]: 球体上的点集。</p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/presets/model/__init__.py#L12" target="_blank">View on 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;">staticmethod</span></span>
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"en/api/presets/model/index.md","filePath":"en/api/presets/model/index.md"}'),t={name:"en/api/presets/model/index.md"},h=n(`<h1 id="mbcp-presets-model" tabindex="-1">mbcp.presets.model <a class="header-anchor" href="#mbcp-presets-model" aria-label="Permalink to &quot;mbcp.presets.model&quot;"></a></h1><p><strong>Description</strong>: 几何模型点集</p><h3 id="class-geometricmodels" tabindex="-1"><em><strong>class</strong></em> <code>GeometricModels</code> <a class="header-anchor" href="#class-geometricmodels" aria-label="Permalink to &quot;***class*** \`GeometricModels\`&quot;"></a></h3><p><a href="https://docs.python.org/3/library/functions.html#staticmethod" target="_blank" rel="noreferrer"><code>@staticmethod</code></a></p><h4 id="func-sphere-radius-float-density-float" tabindex="-1"><em><strong>func</strong></em> <code>sphere(radius: float, density: float)</code> <a class="header-anchor" href="#func-sphere-radius-float-density-float" aria-label="Permalink to &quot;***func*** \`sphere(radius: float, density: float)\`&quot;"></a></h4><p><strong>Description</strong>: 生成球体上的点集。</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>radius:</li><li>density:</li></ul></blockquote><p><strong>Return</strong>: List[Point3]: 球体上的点集。</p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/presets/model/__init__.py#L12" target="_blank">View on 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;">staticmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> sphere</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(radius: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, density: </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;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 生成球体上的点集</span></span>

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"en/api/presets/model/model.md","filePath":"en/api/presets/model/model.md"}'),t={name:"en/api/presets/model/model.md"},h=n(`<h1 id="mbcp-presets-model" tabindex="-1">mbcp.presets.model <a class="header-anchor" href="#mbcp-presets-model" aria-label="Permalink to &quot;mbcp.presets.model&quot;"></a></h1><p><strong>Description</strong>: 几何模型点集</p><h3 id="class-geometricmodels" tabindex="-1"><em><strong>class</strong></em> <code>GeometricModels</code> <a class="header-anchor" href="#class-geometricmodels" aria-label="Permalink to &quot;***class*** \`GeometricModels\`&quot;"></a></h3><p><a href="https://docs.python.org/3/library/functions.html#staticmethod" target="_blank" rel="noreferrer"><code>@staticmethod</code></a></p><h4 id="def-sphere-radius-float-density-float" tabindex="-1"><em><strong>def</strong></em> <code>sphere(radius: float, density: float)</code> <a class="header-anchor" href="#def-sphere-radius-float-density-float" aria-label="Permalink to &quot;***def*** \`sphere(radius: float, density: float)\`&quot;"></a></h4><p><strong>Description</strong>: 生成球体上的点集。</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>radius:</li><li>density:</li></ul></blockquote><p><strong>Return</strong>: List[Point3]: 球体上的点集。</p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/presets/model/__init__.py#L12" target="_blank">View on 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;">staticmethod</span></span>
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"en/api/presets/model/model.md","filePath":"en/api/presets/model/model.md"}'),t={name:"en/api/presets/model/model.md"},h=n(`<h1 id="mbcp-presets-model" tabindex="-1">mbcp.presets.model <a class="header-anchor" href="#mbcp-presets-model" aria-label="Permalink to &quot;mbcp.presets.model&quot;"></a></h1><p><strong>Description</strong>: 几何模型点集</p><h3 id="class-geometricmodels" tabindex="-1"><em><strong>class</strong></em> <code>GeometricModels</code> <a class="header-anchor" href="#class-geometricmodels" aria-label="Permalink to &quot;***class*** \`GeometricModels\`&quot;"></a></h3><p><a href="https://docs.python.org/3/library/functions.html#staticmethod" target="_blank" rel="noreferrer"><code>@staticmethod</code></a></p><h4 id="func-sphere-radius-float-density-float" tabindex="-1"><em><strong>func</strong></em> <code>sphere(radius: float, density: float)</code> <a class="header-anchor" href="#func-sphere-radius-float-density-float" aria-label="Permalink to &quot;***func*** \`sphere(radius: float, density: float)\`&quot;"></a></h4><p><strong>Description</strong>: 生成球体上的点集。</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>radius:</li><li>density:</li></ul></blockquote><p><strong>Return</strong>: List[Point3]: 球体上的点集。</p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/presets/model/__init__.py#L12" target="_blank">View on 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;">staticmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> sphere</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(radius: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, density: </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;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 生成球体上的点集</span></span>

View File

@ -1,4 +1,4 @@
import{_ as s,c as a,o as i,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle","lastUpdated":false},"headers":[],"relativePath":"zht/api/mp_math/angle.md","filePath":"zht/api/mp_math/angle.md"}'),t={name:"zht/api/mp_math/angle.md"},e=n(`<h1 id="mbcp-mp-math-angle" tabindex="-1">mbcp.mp_math.angle <a class="header-anchor" href="#mbcp-mp-math-angle" aria-label="Permalink to &quot;mbcp.mp_math.angle&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了角度相关的类</p><h3 id="class-angle" tabindex="-1"><em><strong>class</strong></em> <code>Angle</code> <a class="header-anchor" href="#class-angle" aria-label="Permalink to &quot;***class*** \`Angle\`&quot;"></a></h3><h3 id="class-anyangle-angle" tabindex="-1"><em><strong>class</strong></em> <code>AnyAngle(Angle)</code> <a class="header-anchor" href="#class-anyangle-angle" aria-label="Permalink to &quot;***class*** \`AnyAngle(Angle)\`&quot;"></a></h3><h4 id="def-init-self-value-float-is-radian-bool-false" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, value: float, is_radian: bool = False)</code> <a class="header-anchor" href="#def-init-self-value-float-is-radian-bool-false" aria-label="Permalink to &quot;***def*** \`__init__(self, value: float, is_radian: bool = False)\`&quot;"></a></h4><p><strong>説明</strong>: 任意角度。</p><p><strong>變數説明</strong>:</p><blockquote><ul><li>value: 角度或弧度值</li><li>is_radian: 是否为弧度,默认为否</li></ul></blockquote><details><summary><b>源碼</b> 或 <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L17" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, value: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, is_radian: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">False</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
import{_ as s,c as a,o as i,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/angle.md","filePath":"ja/api/mp_math/angle.md"}'),t={name:"ja/api/mp_math/angle.md"},e=n(`<h1 id="mbcp-mp-math-angle" tabindex="-1">mbcp.mp_math.angle <a class="header-anchor" href="#mbcp-mp-math-angle" aria-label="Permalink to &quot;mbcp.mp_math.angle&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了角度相关的类</p><h3 id="class-angle" tabindex="-1"><em><strong>class</strong></em> <code>Angle</code> <a class="header-anchor" href="#class-angle" aria-label="Permalink to &quot;***class*** \`Angle\`&quot;"></a></h3><h3 id="class-anyangle-angle" tabindex="-1"><em><strong>class</strong></em> <code>AnyAngle(Angle)</code> <a class="header-anchor" href="#class-anyangle-angle" aria-label="Permalink to &quot;***class*** \`AnyAngle(Angle)\`&quot;"></a></h3><h4 id="func-init-self-value-float-is-radian-bool-false" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, value: float, is_radian: bool = False)</code> <a class="header-anchor" href="#func-init-self-value-float-is-radian-bool-false" aria-label="Permalink to &quot;***func*** \`__init__(self, value: float, is_radian: bool = False)\`&quot;"></a></h4><p><strong>説明</strong>: 任意角度。</p><p><strong>引数</strong>:</p><blockquote><ul><li>value: 角度或弧度值</li><li>is_radian: 是否为弧度,默认为否</li></ul></blockquote><details><summary><b>ソースコード</b> または <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/angle.py#L17" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, value: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, is_radian: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">False</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -8,92 +8,92 @@ import{_ as s,c as a,o as i,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c
<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>
<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="def-complementary-self-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>complementary(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#def-complementary-self-anyangle" aria-label="Permalink to &quot;***def*** \`complementary(self) -&gt; AnyAngle\`&quot;"></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>
<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="func-complementary-self-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>complementary(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#func-complementary-self-anyangle" aria-label="Permalink to &quot;***func*** \`complementary(self) -&gt; AnyAngle\`&quot;"></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>
<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) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</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;">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="def-supplementary-self-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>supplementary(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#def-supplementary-self-anyangle" aria-label="Permalink to &quot;***def*** \`supplementary(self) -&gt; AnyAngle\`&quot;"></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>
<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="func-supplementary-self-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>supplementary(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#func-supplementary-self-anyangle" aria-label="Permalink to &quot;***func*** \`supplementary(self) -&gt; AnyAngle\`&quot;"></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>
<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) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</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;">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="def-degree-self-float" tabindex="-1"><em><strong>def</strong></em> <code>degree(self) -&gt; float</code> <a class="header-anchor" href="#def-degree-self-float" aria-label="Permalink to &quot;***def*** \`degree(self) -&gt; float\`&quot;"></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>
<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="func-degree-self-float" tabindex="-1"><em><strong>func</strong></em> <code>degree(self) -&gt; float</code> <a class="header-anchor" href="#func-degree-self-float" aria-label="Permalink to &quot;***func*** \`degree(self) -&gt; float\`&quot;"></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>
<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) -&gt; </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;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</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:#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="def-minimum-positive-self-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>minimum_positive(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#def-minimum-positive-self-anyangle" aria-label="Permalink to &quot;***def*** \`minimum_positive(self) -&gt; AnyAngle\`&quot;"></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>
<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="func-minimum-positive-self-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>minimum_positive(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#func-minimum-positive-self-anyangle" aria-label="Permalink to &quot;***func*** \`minimum_positive(self) -&gt; AnyAngle\`&quot;"></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>
<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) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</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;"> (</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="def-maximum-negative-self-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>maximum_negative(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#def-maximum-negative-self-anyangle" aria-label="Permalink to &quot;***def*** \`maximum_negative(self) -&gt; AnyAngle\`&quot;"></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>
<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="func-maximum-negative-self-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>maximum_negative(self) -&gt; AnyAngle</code> <a class="header-anchor" href="#func-maximum-negative-self-anyangle" aria-label="Permalink to &quot;***func*** \`maximum_negative(self) -&gt; AnyAngle\`&quot;"></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>
<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) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</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:#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="def-sin-self-float" tabindex="-1"><em><strong>def</strong></em> <code>sin(self) -&gt; float</code> <a class="header-anchor" href="#def-sin-self-float" aria-label="Permalink to &quot;***def*** \`sin(self) -&gt; float\`&quot;"></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>
<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="func-sin-self-float" tabindex="-1"><em><strong>func</strong></em> <code>sin(self) -&gt; float</code> <a class="header-anchor" href="#func-sin-self-float" aria-label="Permalink to &quot;***func*** \`sin(self) -&gt; float\`&quot;"></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>
<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) -&gt; </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;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</span></span>
<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="def-cos-self-float" tabindex="-1"><em><strong>def</strong></em> <code>cos(self) -&gt; float</code> <a class="header-anchor" href="#def-cos-self-float" aria-label="Permalink to &quot;***def*** \`cos(self) -&gt; float\`&quot;"></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>
<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="func-cos-self-float" tabindex="-1"><em><strong>func</strong></em> <code>cos(self) -&gt; float</code> <a class="header-anchor" href="#func-cos-self-float" aria-label="Permalink to &quot;***func*** \`cos(self) -&gt; float\`&quot;"></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>
<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) -&gt; </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;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</span></span>
<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="def-tan-self-float" tabindex="-1"><em><strong>def</strong></em> <code>tan(self) -&gt; float</code> <a class="header-anchor" href="#def-tan-self-float" aria-label="Permalink to &quot;***def*** \`tan(self) -&gt; float\`&quot;"></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>
<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="func-tan-self-float" tabindex="-1"><em><strong>func</strong></em> <code>tan(self) -&gt; float</code> <a class="header-anchor" href="#func-tan-self-float" aria-label="Permalink to &quot;***func*** \`tan(self) -&gt; float\`&quot;"></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>
<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) -&gt; </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;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</span></span>
<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="def-cot-self-float" tabindex="-1"><em><strong>def</strong></em> <code>cot(self) -&gt; float</code> <a class="header-anchor" href="#def-cot-self-float" aria-label="Permalink to &quot;***def*** \`cot(self) -&gt; float\`&quot;"></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>
<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="func-cot-self-float" tabindex="-1"><em><strong>func</strong></em> <code>cot(self) -&gt; float</code> <a class="header-anchor" href="#func-cot-self-float" aria-label="Permalink to &quot;***func*** \`cot(self) -&gt; float\`&quot;"></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>
<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) -&gt; </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;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</span></span>
<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="def-sec-self-float" tabindex="-1"><em><strong>def</strong></em> <code>sec(self) -&gt; float</code> <a class="header-anchor" href="#def-sec-self-float" aria-label="Permalink to &quot;***def*** \`sec(self) -&gt; float\`&quot;"></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>
<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="func-sec-self-float" tabindex="-1"><em><strong>func</strong></em> <code>sec(self) -&gt; float</code> <a class="header-anchor" href="#func-sec-self-float" aria-label="Permalink to &quot;***func*** \`sec(self) -&gt; float\`&quot;"></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>
<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) -&gt; </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;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</span></span>
<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="def-csc-self-float" tabindex="-1"><em><strong>def</strong></em> <code>csc(self) -&gt; float</code> <a class="header-anchor" href="#def-csc-self-float" aria-label="Permalink to &quot;***def*** \`csc(self) -&gt; float\`&quot;"></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>
<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="func-csc-self-float" tabindex="-1"><em><strong>func</strong></em> <code>csc(self) -&gt; float</code> <a class="header-anchor" href="#func-csc-self-float" aria-label="Permalink to &quot;***func*** \`csc(self) -&gt; float\`&quot;"></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>
<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) -&gt; </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;"> &quot;&quot;&quot;</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;"> &quot;&quot;&quot;</span></span>
<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="def-self-other-anyangle-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>self + other: AnyAngle =&gt; AnyAngle</code> <a class="header-anchor" href="#def-self-other-anyangle-anyangle" aria-label="Permalink to &quot;***def*** \`self + other: AnyAngle =&gt; AnyAngle\`&quot;"></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;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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="def-eq-self-other" tabindex="-1"><em><strong>def</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#def-eq-self-other" aria-label="Permalink to &quot;***def*** \`__eq__(self, other)\`&quot;"></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="def-self-other-anyangle-anyangle-1" tabindex="-1"><em><strong>def</strong></em> <code>self - other: AnyAngle =&gt; AnyAngle</code> <a class="header-anchor" href="#def-self-other-anyangle-anyangle-1" aria-label="Permalink to &quot;***def*** \`self - other: AnyAngle =&gt; AnyAngle\`&quot;"></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;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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="def-self-other-float-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>self * other: float =&gt; AnyAngle</code> <a class="header-anchor" href="#def-self-other-float-anyangle" aria-label="Permalink to &quot;***def*** \`self * other: float =&gt; AnyAngle\`&quot;"></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;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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="def-self-other-float-anyangle-1" tabindex="-1"><em><strong>def</strong></em> <code>self / other: float =&gt; AnyAngle</code> <a class="header-anchor" href="#def-self-other-float-anyangle-1" aria-label="Permalink to &quot;***def*** \`self / other: float =&gt; AnyAngle\`&quot;"></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>
<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="func-self-other-anyangle-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>self + other: AnyAngle =&gt; AnyAngle</code> <a class="header-anchor" href="#func-self-other-anyangle-anyangle" aria-label="Permalink to &quot;***func*** \`self + other: AnyAngle =&gt; AnyAngle\`&quot;"></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;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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="func-eq-self-other" tabindex="-1"><em><strong>func</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#func-eq-self-other" aria-label="Permalink to &quot;***func*** \`__eq__(self, other)\`&quot;"></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="func-self-other-anyangle-anyangle-1" tabindex="-1"><em><strong>func</strong></em> <code>self - other: AnyAngle =&gt; AnyAngle</code> <a class="header-anchor" href="#func-self-other-anyangle-anyangle-1" aria-label="Permalink to &quot;***func*** \`self - other: AnyAngle =&gt; AnyAngle\`&quot;"></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;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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="func-self-other-float-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>self * other: float =&gt; AnyAngle</code> <a class="header-anchor" href="#func-self-other-float-anyangle" aria-label="Permalink to &quot;***func*** \`self * other: float =&gt; AnyAngle\`&quot;"></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;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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="func-self-other-float-anyangle-1" tabindex="-1"><em><strong>func</strong></em> <code>self / other: float =&gt; AnyAngle</code> <a class="header-anchor" href="#func-self-other-float-anyangle-1" aria-label="Permalink to &quot;***func*** \`self / other: float =&gt; AnyAngle\`&quot;"></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>
<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;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-anyangle-float" tabindex="-1"><em><strong>def</strong></em> <code>self / other: AnyAngle =&gt; float</code> <a class="header-anchor" href="#def-self-other-anyangle-float" aria-label="Permalink to &quot;***def*** \`self / other: AnyAngle =&gt; float\`&quot;"></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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-anyangle-float" tabindex="-1"><em><strong>func</strong></em> <code>self / other: AnyAngle =&gt; float</code> <a class="header-anchor" href="#func-self-other-anyangle-float" aria-label="Permalink to &quot;***func*** \`self / other: AnyAngle =&gt; float\`&quot;"></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>
<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;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </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:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="def-self-other" tabindex="-1"><em><strong>def</strong></em> <code>self / other</code> <a class="header-anchor" href="#def-self-other" aria-label="Permalink to &quot;***def*** \`self / other\`&quot;"></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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="func-self-other" tabindex="-1"><em><strong>func</strong></em> <code>self / other</code> <a class="header-anchor" href="#func-self-other" aria-label="Permalink to &quot;***func*** \`self / other\`&quot;"></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>
<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>`,80),l=[e];function h(p,k,r,d,o,g){return i(),a("div",null,l)}const F=s(t,[["render",h]]);export{c as __pageData,F as default};
<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>`,80),l=[e];function h(p,k,r,o,d,g){return i(),a("div",null,l)}const F=s(t,[["render",h]]);export{c as __pageData,F as default};

View File

@ -1 +1 @@
import{_ as s,c as a,o as i,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/angle.md","filePath":"ja/api/mp_math/angle.md"}'),t={name:"ja/api/mp_math/angle.md"},e=n("",80),l=[e];function h(p,k,r,d,o,g){return i(),a("div",null,l)}const F=s(t,[["render",h]]);export{c as __pageData,F as default};
import{_ as s,c as a,o as i,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/angle.md","filePath":"ja/api/mp_math/angle.md"}'),t={name:"ja/api/mp_math/angle.md"},e=n("",80),l=[e];function h(p,k,r,o,d,g){return i(),a("div",null,l)}const F=s(t,[["render",h]]);export{c as __pageData,F as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/equation.md","filePath":"ja/api/mp_math/equation.md"}'),t={name:"ja/api/mp_math/equation.md"},l=n(`<h1 id="mbcp-mp-math-equation" tabindex="-1">mbcp.mp_math.equation <a class="header-anchor" href="#mbcp-mp-math-equation" aria-label="Permalink to &quot;mbcp.mp_math.equation&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了方程相关的类和函数以及一些常用的数学函数</p><h3 id="class-curveequation" tabindex="-1"><em><strong>class</strong></em> <code>CurveEquation</code> <a class="header-anchor" href="#class-curveequation" aria-label="Permalink to &quot;***class*** \`CurveEquation\`&quot;"></a></h3><h4 id="def-init-self-x-func-onevarfunc-y-func-onevarfunc-z-func-onevarfunc" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)</code> <a class="header-anchor" href="#def-init-self-x-func-onevarfunc-y-func-onevarfunc-z-func-onevarfunc" aria-label="Permalink to &quot;***def*** \`__init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)\`&quot;"></a></h4><p><strong>説明</strong>: 曲线方程。</p><p><strong>引数</strong>:</p><blockquote><ul><li>x_func (<a href="./mp_math_typing.html#var-onevarfunc"><code>OneVarFunc</code></a>): x函数</li><li>y_func (<a href="./mp_math_typing.html#var-onevarfunc"><code>OneVarFunc</code></a>): y函数</li><li>z_func (<a href="./mp_math_typing.html#var-onevarfunc"><code>OneVarFunc</code></a>): z函数</li></ul></blockquote><details><summary><b>ソースコード</b> または <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/equation.py#L12" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):</span></span>
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/equation.md","filePath":"ja/api/mp_math/equation.md"}'),t={name:"ja/api/mp_math/equation.md"},l=n(`<h1 id="mbcp-mp-math-equation" tabindex="-1">mbcp.mp_math.equation <a class="header-anchor" href="#mbcp-mp-math-equation" aria-label="Permalink to &quot;mbcp.mp_math.equation&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了方程相关的类和函数以及一些常用的数学函数</p><h3 id="class-curveequation" tabindex="-1"><em><strong>class</strong></em> <code>CurveEquation</code> <a class="header-anchor" href="#class-curveequation" aria-label="Permalink to &quot;***class*** \`CurveEquation\`&quot;"></a></h3><h4 id="func-init-self-x-func-onevarfunc-y-func-onevarfunc-z-func-onevarfunc" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)</code> <a class="header-anchor" href="#func-init-self-x-func-onevarfunc-y-func-onevarfunc-z-func-onevarfunc" aria-label="Permalink to &quot;***func*** \`__init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)\`&quot;"></a></h4><p><strong>説明</strong>: 曲线方程。</p><p><strong>引数</strong>:</p><blockquote><ul><li>x_func (<a href="./mp_math_typing.html#var-onevarfunc"><code>OneVarFunc</code></a>): x函数</li><li>y_func (<a href="./mp_math_typing.html#var-onevarfunc"><code>OneVarFunc</code></a>): y函数</li><li>z_func (<a href="./mp_math_typing.html#var-onevarfunc"><code>OneVarFunc</code></a>): z函数</li></ul></blockquote><details><summary><b>ソースコード</b> または <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/equation.py#L12" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -8,7 +8,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const u
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x_func </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x_func</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y_func </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> y_func</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z_func </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> z_func</span></span></code></pre></div></details><h4 id="def-call-self-t-var-point3-tuple-point3" tabindex="-1"><em><strong>def</strong></em> <code>__call__(self, *t: Var) -&gt; Point3 | tuple[Point3, ...]</code> <a class="header-anchor" href="#def-call-self-t-var-point3-tuple-point3" aria-label="Permalink to &quot;***def*** \`__call__(self, *t: Var) -&gt; Point3 | tuple[Point3, ...]\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>*t:</li><li>:</li></ul></blockquote><p><strong></strong>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/equation.py#L24" 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;"> __call__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t: Var) -&gt; Point3 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tuple[Point3, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z_func </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> z_func</span></span></code></pre></div></details><h4 id="func-call-self-t-var-point3-tuple-point3" tabindex="-1"><em><strong>func</strong></em> <code>__call__(self, *t: Var) -&gt; Point3 | tuple[Point3, ...]</code> <a class="header-anchor" href="#func-call-self-t-var-point3-tuple-point3" aria-label="Permalink to &quot;***func*** \`__call__(self, *t: Var) -&gt; Point3 | tuple[Point3, ...]\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>*t:</li><li>:</li></ul></blockquote><p><strong></strong>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/equation.py#L24" 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;"> __call__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t: Var) -&gt; Point3 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tuple[Point3, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -20,7 +20,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const u
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> len</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(t) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1</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;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x_func(t[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]), </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y_func(t[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]), </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z_func(t[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]))</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> tuple</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([Point3(x, y, z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">for</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x, y, z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">in</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> zip</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x_func(t), </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y_func(t), </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z_func(t))])</span></span></code></pre></div></details><h3 id="def-get-partial-derivative-func-func-multivarsfunc-var-int-tuple-int-epsilon-number-epsilon-multivarsfunc" tabindex="-1"><em><strong>def</strong></em> <code>get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -&gt; MultiVarsFunc</code> <a class="header-anchor" href="#def-get-partial-derivative-func-func-multivarsfunc-var-int-tuple-int-epsilon-number-epsilon-multivarsfunc" aria-label="Permalink to &quot;***def*** \`get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -&gt; MultiVarsFunc\`&quot;"></a></h3><p><strong></strong>: N</p><div class="warning custom-block github-alert"><p class="custom-block-title">WARNING</p><p></p></div><p><strong></strong>:</p><blockquote><ul><li>func (<a href="./mp_math_typing.html#var-multivarsfunc"><code>MultiVarsFunc</code></a>): N</li><li>var: ()()</li><li>epsilon: </li></ul></blockquote><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>ValueError </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/equation.py#L42" 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:#6F42C1;--shiki-dark:#B392F0;"> get_partial_derivative_func</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(func: MultiVarsFunc, var: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">int</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tuple[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">int</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">], epsilon: Number</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">EPSILON</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; MultiVarsFunc:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> tuple</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([Point3(x, y, z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">for</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x, y, z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">in</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> zip</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x_func(t), </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y_func(t), </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z_func(t))])</span></span></code></pre></div></details><h3 id="func-get-partial-derivative-func-func-multivarsfunc-var-int-tuple-int-epsilon-number-epsilon-multivarsfunc" tabindex="-1"><em><strong>func</strong></em> <code>get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -&gt; MultiVarsFunc</code> <a class="header-anchor" href="#func-get-partial-derivative-func-func-multivarsfunc-var-int-tuple-int-epsilon-number-epsilon-multivarsfunc" aria-label="Permalink to &quot;***func*** \`get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -&gt; MultiVarsFunc\`&quot;"></a></h3><p><strong></strong>: N</p><div class="warning custom-block github-alert"><p class="custom-block-title">WARNING</p><p></p></div><p><strong></strong>:</p><blockquote><ul><li>func (<a href="./mp_math_typing.html#var-multivarsfunc"><code>MultiVarsFunc</code></a>): N</li><li>var: ()()</li><li>epsilon: </li></ul></blockquote><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>ValueError </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/equation.py#L42" 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:#6F42C1;--shiki-dark:#B392F0;"> get_partial_derivative_func</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(func: MultiVarsFunc, var: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">int</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tuple[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">int</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">], epsilon: Number</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">EPSILON</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; MultiVarsFunc:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 求N元函数一阶偏导函数这玩意不太稳定慎用</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &gt; [!warning]</span></span>
@ -62,4 +62,4 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const u
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> result_func(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">args)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> high_order_partial_derivative_func</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ValueError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Invalid var type&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details>`,23),p=[l];function h(e,k,r,E,d,g){return a(),i("div",null,p)}const F=s(t,[["render",h]]);export{u as __pageData,F as default};
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ValueError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Invalid var type&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details>`,23),p=[l];function h(k,e,r,E,c,d){return a(),i("div",null,p)}const F=s(t,[["render",h]]);export{u as __pageData,F as default};

View File

@ -1 +1 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/equation.md","filePath":"ja/api/mp_math/equation.md"}'),t={name:"ja/api/mp_math/equation.md"},l=n("",23),p=[l];function h(e,k,r,E,d,g){return a(),i("div",null,p)}const F=s(t,[["render",h]]);export{u as __pageData,F as default};
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/equation.md","filePath":"ja/api/mp_math/equation.md"}'),t={name:"ja/api/mp_math/equation.md"},l=n("",23),p=[l];function h(k,e,r,E,c,d){return a(),i("div",null,p)}const F=s(t,[["render",h]]);export{u as __pageData,F as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{_ as l,c as t,j as s,a as n,a4 as a,o as i}from"./chunks/framework.DpC1ZpOZ.js";const Z=JSON.parse('{"title":"mbcp.mp_math.function","description":"","frontmatter":{"title":"mbcp.mp_math.function","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/function.md","filePath":"ja/api/mp_math/function.md"}'),e={name:"ja/api/mp_math/function.md"},Q=a("",4),T={class:"tip custom-block github-alert"},h=s("p",{class:"custom-block-title"},"TIP",-1),p={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},r={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"8.471ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 3744.3 1000","aria-hidden":"true"},d=a("",1),o=[d],k=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mi",null,"f"),s("mo",{stretchy:"false"},"("),s("mi",null,"x"),s("mo",null,","),s("mi",null,"y"),s("mo",null,","),s("mi",null,"z"),s("mo",{stretchy:"false"},")")])],-1),m={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},g={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"10.19ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 4504 1000","aria-hidden":"true"},c=a("",1),y=[c],u=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mo",{stretchy:"false"},"("),s("msub",null,[s("mi",null,"x"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"y"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"z"),s("mn",null,"0")]),s("mo",{stretchy:"false"},")")])],-1),E={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},F={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-1.469ex"},xmlns:"http://www.w3.org/2000/svg",width:"29.427ex",height:"4.07ex",role:"img",focusable:"false",viewBox:"0 -1149.5 13006.8 1799","aria-hidden":"true"},f=a("",1),_=[f],C=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mi",{mathvariant:"normal"},"∇"),s("mi",null,"f"),s("mo",{stretchy:"false"},"("),s("msub",null,[s("mi",null,"x"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"y"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"z"),s("mn",null,"0")]),s("mo",{stretchy:"false"},")"),s("mo",null,"="),s("mrow",{"data-mjx-texclass":"INNER"},[s("mo",{"data-mjx-texclass":"OPEN"},"("),s("mfrac",null,[s("mrow",null,[s("mi",null,"∂"),s("mi",null,"f")]),s("mrow",null,[s("mi",null,"∂"),s("mi",null,"x")])]),s("mo",null,","),s("mfrac",null,[s("mrow",null,[s("mi",null,"∂"),s("mi",null,"f")]),s("mrow",null,[s("mi",null,"∂"),s("mi",null,"y")])]),s("mo",null,","),s("mfrac",null,[s("mrow",null,[s("mi",null,"∂"),s("mi",null,"f")]),s("mrow",null,[s("mi",null,"∂"),s("mi",null,"z")])]),s("mo",{"data-mjx-texclass":"CLOSE"},")")])])],-1),w=a("",13);function x(b,L,H,M,B,v){return i(),t("div",null,[Q,s("div",T,[h,s("p",null,[n("已知一个函数"),s("mjx-container",p,[(i(),t("svg",r,o)),k]),n(",则其在点"),s("mjx-container",m,[(i(),t("svg",g,y)),u]),n("处的梯度向量为: "),s("mjx-container",E,[(i(),t("svg",F,_)),C])])]),w])}const V=l(e,[["render",x]]);export{Z as __pageData,V as default};
import{_ as l,c as t,j as s,a as n,a4 as a,o as i}from"./chunks/framework.DpC1ZpOZ.js";const Z=JSON.parse('{"title":"mbcp.mp_math.function","description":"","frontmatter":{"title":"mbcp.mp_math.function","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/function.md","filePath":"ja/api/mp_math/function.md"}'),e={name:"ja/api/mp_math/function.md"},Q=a("",4),T={class:"tip custom-block github-alert"},h=s("p",{class:"custom-block-title"},"TIP",-1),p={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},r={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"8.471ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 3744.3 1000","aria-hidden":"true"},d=a("",1),o=[d],k=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mi",null,"f"),s("mo",{stretchy:"false"},"("),s("mi",null,"x"),s("mo",null,","),s("mi",null,"y"),s("mo",null,","),s("mi",null,"z"),s("mo",{stretchy:"false"},")")])],-1),m={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},g={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"10.19ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 4504 1000","aria-hidden":"true"},c=a("",1),u=[c],y=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mo",{stretchy:"false"},"("),s("msub",null,[s("mi",null,"x"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"y"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"z"),s("mn",null,"0")]),s("mo",{stretchy:"false"},")")])],-1),E={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},F={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-1.469ex"},xmlns:"http://www.w3.org/2000/svg",width:"29.427ex",height:"4.07ex",role:"img",focusable:"false",viewBox:"0 -1149.5 13006.8 1799","aria-hidden":"true"},f=a("",1),_=[f],C=s("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[s("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[s("mi",{mathvariant:"normal"},"∇"),s("mi",null,"f"),s("mo",{stretchy:"false"},"("),s("msub",null,[s("mi",null,"x"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"y"),s("mn",null,"0")]),s("mo",null,","),s("msub",null,[s("mi",null,"z"),s("mn",null,"0")]),s("mo",{stretchy:"false"},")"),s("mo",null,"="),s("mrow",{"data-mjx-texclass":"INNER"},[s("mo",{"data-mjx-texclass":"OPEN"},"("),s("mfrac",null,[s("mrow",null,[s("mi",null,"∂"),s("mi",null,"f")]),s("mrow",null,[s("mi",null,"∂"),s("mi",null,"x")])]),s("mo",null,","),s("mfrac",null,[s("mrow",null,[s("mi",null,"∂"),s("mi",null,"f")]),s("mrow",null,[s("mi",null,"∂"),s("mi",null,"y")])]),s("mo",null,","),s("mfrac",null,[s("mrow",null,[s("mi",null,"∂"),s("mi",null,"f")]),s("mrow",null,[s("mi",null,"∂"),s("mi",null,"z")])]),s("mo",{"data-mjx-texclass":"CLOSE"},")")])])],-1),w=a("",13);function x(b,L,H,M,B,v){return i(),t("div",null,[Q,s("div",T,[h,s("p",null,[n("已知一个函数"),s("mjx-container",p,[(i(),t("svg",r,o)),k]),n(",则其在点"),s("mjx-container",m,[(i(),t("svg",g,u)),y]),n("处的梯度向量为: "),s("mjx-container",E,[(i(),t("svg",F,_)),C])])]),w])}const V=l(e,[["render",x]]);export{Z as __pageData,V as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line","lastUpdated":false},"headers":[],"relativePath":"en/api/mp_math/line.md","filePath":"en/api/mp_math/line.md"}'),t={name:"en/api/mp_math/line.md"},l=n(`<h1 id="mbcp-mp-math-line" tabindex="-1">mbcp.mp_math.line <a class="header-anchor" href="#mbcp-mp-math-line" aria-label="Permalink to &quot;mbcp.mp_math.line&quot;"></a></h1><p><strong>Description</strong>: 本模块定义了三维空间中的直线类</p><h3 id="class-line3" tabindex="-1"><em><strong>class</strong></em> <code>Line3</code> <a class="header-anchor" href="#class-line3" aria-label="Permalink to &quot;***class*** \`Line3\`&quot;"></a></h3><h4 id="def-init-self-point-point3-direction-vector3" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, point: Point3, direction: Vector3)</code> <a class="header-anchor" href="#def-init-self-point-point3-direction-vector3" aria-label="Permalink to &quot;***def*** \`__init__(self, point: Point3, direction: Vector3)\`&quot;"></a></h4><p><strong>Description</strong>: 三维空间中的直线。由一个点和一个方向向量确定。</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): 直线上的一点</li><li>direction (<a href="./vector.html#class-vector3"><code>Vector3</code></a>): 方向向量</li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L19" target="_blank">View on 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, direction: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/line.md","filePath":"ja/api/mp_math/line.md"}'),t={name:"ja/api/mp_math/line.md"},l=n(`<h1 id="mbcp-mp-math-line" tabindex="-1">mbcp.mp_math.line <a class="header-anchor" href="#mbcp-mp-math-line" aria-label="Permalink to &quot;mbcp.mp_math.line&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了三维空间中的直线类</p><h3 id="class-line3" tabindex="-1"><em><strong>class</strong></em> <code>Line3</code> <a class="header-anchor" href="#class-line3" aria-label="Permalink to &quot;***class*** \`Line3\`&quot;"></a></h3><h4 id="func-init-self-point-point3-direction-vector3" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, point: Point3, direction: Vector3)</code> <a class="header-anchor" href="#func-init-self-point-point3-direction-vector3" aria-label="Permalink to &quot;***func*** \`__init__(self, point: Point3, direction: Vector3)\`&quot;"></a></h4><p><strong>説明</strong>: 三维空间中的直线。由一个点和一个方向向量确定。</p><p><strong>引数</strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): 直线上的一点</li><li>direction (<a href="./vector.html#class-vector3"><code>Vector3</code></a>): 方向向量</li></ul></blockquote><details><summary><b>ソースコード</b> または <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L19" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, direction: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -6,7 +6,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> direction ([\`Vector3\`](./vector#class-vector3)): 方向向量</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> point</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> direction</span></span></code></pre></div></details><h4 id="def-approx-self-other-line3-epsilon-float-approx-bool" tabindex="-1"><em><strong>def</strong></em> <code>approx(self, other: Line3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#def-approx-self-other-line3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***def*** \`approx(self, other: Line3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L29" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> direction</span></span></code></pre></div></details><h4 id="func-approx-self-other-line3-epsilon-float-approx-bool" tabindex="-1"><em><strong>func</strong></em> <code>approx(self, other: Line3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#func-approx-self-other-line3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***func*** \`approx(self, other: Line3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L29" 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -15,7 +15,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https://docs.python.org/3/library/functions.html#bool): 是否近似相等</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.is_approx_parallel(other, epsilon) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point).is_approx_parallel(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction, epsilon)</span></span></code></pre></div></details><h4 id="def-cal-angle-self-other-line3-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>cal_angle(self, other: Line3) -&gt; AnyAngle</code> <a class="header-anchor" href="#def-cal-angle-self-other-line3-anyangle" aria-label="Permalink to &quot;***def*** \`cal_angle(self, other: Line3) -&gt; AnyAngle\`&quot;"></a></h4><p><strong>Description</strong>: 线线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong>Return</strong>: <a href="./angle.html#class-anyangle"><code>AnyAngle</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L40" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> cal_angle</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.is_approx_parallel(other, epsilon) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point).is_approx_parallel(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction, epsilon)</span></span></code></pre></div></details><h4 id="func-cal-angle-self-other-line3-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>cal_angle(self, other: Line3) -&gt; AnyAngle</code> <a class="header-anchor" href="#func-cal-angle-self-other-line3-anyangle" aria-label="Permalink to &quot;***func*** \`cal_angle(self, other: Line3) -&gt; AnyAngle\`&quot;"></a></h4><p><strong></strong>: 线线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./angle.html#class-anyangle"><code>AnyAngle</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L40" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_angle</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -23,7 +23,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`AnyAngle\`](./angle#class-anyangle): 夹角</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.direction.cal_angle(other.direction)</span></span></code></pre></div></details><h4 id="def-cal-distance-self-other-line3-point3-float" tabindex="-1"><em><strong>def</strong></em> <code>cal_distance(self, other: Line3 | Point3) -&gt; float</code> <a class="header-anchor" href="#def-cal-distance-self-other-line3-point3-float" aria-label="Permalink to &quot;***def*** \`cal_distance(self, other: Line3 | Point3) -&gt; float\`&quot;"></a></h4><p><strong>Description</strong>: 线线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): 线</li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><p><strong>Raises</strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L50" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> cal_distance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3 | Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </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:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.cal_angle(other.direction)</span></span></code></pre></div></details><h4 id="func-cal-distance-self-other-line3-point3-float" tabindex="-1"><em><strong>func</strong></em> <code>cal_distance(self, other: Line3 | Point3) -&gt; float</code> <a class="header-anchor" href="#func-cal-distance-self-other-line3-point3-float" aria-label="Permalink to &quot;***func*** \`cal_distance(self, other: Line3 | Point3) -&gt; float\`&quot;"></a></h4><p><strong></strong>: 线线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L50" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_distance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3 | Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </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;"> &quot;&quot;&quot;</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>
@ -45,7 +45,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other, Point3):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (other </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;">.point).cross(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction).length </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;">.direction.length</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type.&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-cal-intersection-self-other-line3-point3" tabindex="-1"><em><strong>def</strong></em> <code>cal_intersection(self, other: Line3) -&gt; Point3</code> <a class="header-anchor" href="#def-cal-intersection-self-other-line3-point3" aria-label="Permalink to &quot;***def*** \`cal_intersection(self, other: Line3) -&gt; Point3\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong>Return</strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><p><strong>Raises</strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>ValueError</code></a> 线</li><li><code>ValueError</code> 线</li></ul></blockquote><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L80" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> cal_intersection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type.&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-cal-intersection-self-other-line3-point3" tabindex="-1"><em><strong>func</strong></em> <code>cal_intersection(self, other: Line3) -&gt; Point3</code> <a class="header-anchor" href="#func-cal-intersection-self-other-line3-point3" aria-label="Permalink to &quot;***func*** \`cal_intersection(self, other: Line3) -&gt; Point3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>ValueError</code></a> 线</li><li><code>ValueError</code> 线</li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L80" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_intersection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -60,7 +60,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ValueError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Lines are parallel and do not intersect.&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> not</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.is_coplanar(other):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ValueError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Lines are not coplanar and do not intersect.&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </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;">.direction.cross(other.direction) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">@</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.direction.cross(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point) </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;">.direction.cross(other.direction).length </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;">.direction</span></span></code></pre></div></details><h4 id="def-cal-perpendicular-self-point-point3-line3" tabindex="-1"><em><strong>def</strong></em> <code>cal_perpendicular(self, point: Point3) -&gt; Line3</code> <a class="header-anchor" href="#def-cal-perpendicular-self-point-point3-line3" aria-label="Permalink to &quot;***def*** \`cal_perpendicular(self, point: Point3) -&gt; Line3\`&quot;"></a></h4><p><strong>Description</strong>: 线p线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="./line.html#class-line3"><code>Line3</code></a>: 线</p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L98" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> cal_perpendicular</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </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;">.direction.cross(other.direction) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">@</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.direction.cross(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point) </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;">.direction.cross(other.direction).length </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;">.direction</span></span></code></pre></div></details><h4 id="func-cal-perpendicular-self-point-point3-line3" tabindex="-1"><em><strong>func</strong></em> <code>cal_perpendicular(self, point: Point3) -&gt; Line3</code> <a class="header-anchor" href="#func-cal-perpendicular-self-point-point3-line3" aria-label="Permalink to &quot;***func*** \`cal_perpendicular(self, point: Point3) -&gt; Line3\`&quot;"></a></h4><p><strong></strong>: 线p线</p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a>: 线</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L98" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_perpendicular</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 计算直线经过指定点p的垂线</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -68,7 +68,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`Line3\`](./line#class-line3): 垂线</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Line3(point, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.cross(point </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;">.point))</span></span></code></pre></div></details><h4 id="def-get-point-self-t-realnumber-point3" tabindex="-1"><em><strong>def</strong></em> <code>get_point(self, t: RealNumber) -&gt; Point3</code> <a class="header-anchor" href="#def-get-point-self-t-realnumber-point3" aria-label="Permalink to &quot;***def*** \`get_point(self, t: RealNumber) -&gt; Point3\`&quot;"></a></h4><p><strong>Description</strong>: 线线t</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>t (<a href="./mp_math_typing.html#var-realnumber"><code>RealNumber</code></a>): t</li></ul></blockquote><p><strong>Return</strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L108" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> get_point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, t: RealNumber) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</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;"> Line3(point, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.cross(point </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;">.point))</span></span></code></pre></div></details><h4 id="func-get-point-self-t-realnumber-point3" tabindex="-1"><em><strong>func</strong></em> <code>get_point(self, t: RealNumber) -&gt; Point3</code> <a class="header-anchor" href="#func-get-point-self-t-realnumber-point3" aria-label="Permalink to &quot;***func*** \`get_point(self, t: RealNumber) -&gt; Point3\`&quot;"></a></h4><p><strong></strong>: 线线t</p><p><strong></strong>:</p><blockquote><ul><li>t (<a href="./mp_math_typing.html#var-realnumber"><code>RealNumber</code></a>): t</li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L108" 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:#6F42C1;--shiki-dark:#B392F0;"> get_point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, t: RealNumber) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 获取直线上的点同一条直线但起始点和方向向量不同则同一个t对应的点不同</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -76,13 +76,13 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`Point3\`](./point#class-point3): 点</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t </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;">.direction</span></span></code></pre></div></details><h4 id="def-get-parametric-equations-self-tuple-onesinglevarfunc-onesinglevarfunc-onesinglevarfunc" tabindex="-1"><em><strong>def</strong></em> <code>get_parametric_equations(self) -&gt; tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]</code> <a class="header-anchor" href="#def-get-parametric-equations-self-tuple-onesinglevarfunc-onesinglevarfunc-onesinglevarfunc" aria-label="Permalink to &quot;***def*** \`get_parametric_equations(self) -&gt; tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/stdtypes.html#tuple" target="_blank" rel="noreferrer"><code>tuple</code></a>[<a href="./mp_math_typing.html#var-onesinglevarfunc"><code>OneSingleVarFunc</code></a>, <code>OneSingleVarFunc</code>, <code>OneSingleVarFunc</code>]: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L118" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> get_parametric_equations</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:</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;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t </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;">.direction</span></span></code></pre></div></details><h4 id="func-get-parametric-equations-self-tuple-onesinglevarfunc-onesinglevarfunc-onesinglevarfunc" tabindex="-1"><em><strong>func</strong></em> <code>get_parametric_equations(self) -&gt; tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]</code> <a class="header-anchor" href="#func-get-parametric-equations-self-tuple-onesinglevarfunc-onesinglevarfunc-onesinglevarfunc" aria-label="Permalink to &quot;***func*** \`get_parametric_equations(self) -&gt; tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>: <a href="https://docs.python.org/3/library/stdtypes.html#tuple" target="_blank" rel="noreferrer"><code>tuple</code></a>[<a href="./mp_math_typing.html#var-onesinglevarfunc"><code>OneSingleVarFunc</code></a>, <code>OneSingleVarFunc</code>, <code>OneSingleVarFunc</code>]: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L118" 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:#6F42C1;--shiki-dark:#B392F0;"> get_parametric_equations</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> [\`tuple\`](https%3A//docs.python.org/3/library/stdtypes.html#tuple)[[\`OneSingleVarFunc\`](./mp_math_typing#var-onesinglevarfunc), \`OneSingleVarFunc\`, \`OneSingleVarFunc\`]: 参数方程</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">lambda</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.x </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;">.direction.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">lambda</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.y </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;">.direction.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">lambda</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.z </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;">.direction.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t)</span></span></code></pre></div></details><h4 id="def-is-approx-parallel-self-other-line3-epsilon-float-1e-06-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -&gt; bool</code> <a class="header-anchor" href="#def-is-approx-parallel-self-other-line3-epsilon-float-1e-06-bool" aria-label="Permalink to &quot;***def*** \`is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L128" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> is_approx_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1e-06</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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;"> (</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">lambda</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.x </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;">.direction.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">lambda</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.y </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;">.direction.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">lambda</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.z </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;">.direction.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t)</span></span></code></pre></div></details><h4 id="func-is-approx-parallel-self-other-line3-epsilon-float-1e-06-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -&gt; bool</code> <a class="header-anchor" href="#func-is-approx-parallel-self-other-line3-epsilon-float-1e-06-bool" aria-label="Permalink to &quot;***func*** \`is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.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:#6F42C1;--shiki-dark:#B392F0;"> is_approx_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1e-06</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -91,7 +91,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否近似平行</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.direction.is_approx_parallel(other.direction, epsilon)</span></span></code></pre></div></details><h4 id="def-is-parallel-self-other-line3-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_parallel(self, other: Line3) -&gt; bool</code> <a class="header-anchor" href="#def-is-parallel-self-other-line3-bool" aria-label="Permalink to &quot;***def*** \`is_parallel(self, other: Line3) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L139" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> is_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.is_approx_parallel(other.direction, epsilon)</span></span></code></pre></div></details><h4 id="func-is-parallel-self-other-line3-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_parallel(self, other: Line3) -&gt; bool</code> <a class="header-anchor" href="#func-is-parallel-self-other-line3-bool" aria-label="Permalink to &quot;***func*** \`is_parallel(self, other: Line3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L139" 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:#6F42C1;--shiki-dark:#B392F0;"> is_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -99,7 +99,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否平行</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.direction.is_parallel(other.direction)</span></span></code></pre></div></details><h4 id="def-is-collinear-self-other-line3-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_collinear(self, other: Line3) -&gt; bool</code> <a class="header-anchor" href="#def-is-collinear-self-other-line3-bool" aria-label="Permalink to &quot;***def*** \`is_collinear(self, other: Line3) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: 线线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: 线</p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L149" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> is_collinear</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.is_parallel(other.direction)</span></span></code></pre></div></details><h4 id="func-is-collinear-self-other-line3-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_collinear(self, other: Line3) -&gt; bool</code> <a class="header-anchor" href="#func-is-collinear-self-other-line3-bool" aria-label="Permalink to &quot;***func*** \`is_collinear(self, other: Line3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: 线</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L149" 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:#6F42C1;--shiki-dark:#B392F0;"> is_collinear</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -107,7 +107,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否共线</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.is_parallel(other) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point).is_parallel(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction)</span></span></code></pre></div></details><h4 id="def-is-point-on-self-point-point3-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_point_on(self, point: Point3) -&gt; bool</code> <a class="header-anchor" href="#def-is-point-on-self-point-point3-bool" aria-label="Permalink to &quot;***def*** \`is_point_on(self, point: Point3) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: 线</p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L159" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> is_point_on</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.is_parallel(other) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point).is_parallel(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction)</span></span></code></pre></div></details><h4 id="func-is-point-on-self-point-point3-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_point_on(self, point: Point3) -&gt; bool</code> <a class="header-anchor" href="#func-is-point-on-self-point-point3-bool" aria-label="Permalink to &quot;***func*** \`is_point_on(self, point: Point3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: 线</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L159" 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:#6F42C1;--shiki-dark:#B392F0;"> is_point_on</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -115,7 +115,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否在直线上</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (point </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;">.point).is_parallel(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction)</span></span></code></pre></div></details><h4 id="def-is-coplanar-self-other-line3-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_coplanar(self, other: Line3) -&gt; bool</code> <a class="header-anchor" href="#def-is-coplanar-self-other-line3-bool" aria-label="Permalink to &quot;***def*** \`is_coplanar(self, other: Line3) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: 线 线线0</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): </li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L169" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> is_coplanar</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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;"> (point </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;">.point).is_parallel(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction)</span></span></code></pre></div></details><h4 id="func-is-coplanar-self-other-line3-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_coplanar(self, other: Line3) -&gt; bool</code> <a class="header-anchor" href="#func-is-coplanar-self-other-line3-bool" aria-label="Permalink to &quot;***func*** \`is_coplanar(self, other: Line3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线 线线0</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L169" 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:#6F42C1;--shiki-dark:#B392F0;"> is_coplanar</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> 充要条件两直线方向向量的叉乘与两直线上任意一点的向量的点积为0</span></span>
@ -124,7 +124,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否共面</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.direction.cross(other.direction) </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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span></span></code></pre></div></details><h4 id="def-simplify-self" tabindex="-1"><em><strong>def</strong></em> <code>simplify(self)</code> <a class="header-anchor" href="#def-simplify-self" aria-label="Permalink to &quot;***def*** \`simplify(self)\`&quot;"></a></h4><p><strong>Description</strong>: 线 </p><p>x y z 0 </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L180" target="_blank">View on 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:#6F42C1;--shiki-dark:#B392F0;"> simplify</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.cross(other.direction) </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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span></span></code></pre></div></details><h4 id="func-simplify-self" tabindex="-1"><em><strong>func</strong></em> <code>simplify(self)</code> <a class="header-anchor" href="#func-simplify-self" aria-label="Permalink to &quot;***func*** \`simplify(self)\`&quot;"></a></h4><p><strong></strong>: 线 </p><p>x y z 0 </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L180" 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:#6F42C1;--shiki-dark:#B392F0;"> simplify</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -137,7 +137,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="def-from-two-points-cls-p1-point3-p2-point3-line3" tabindex="-1"><em><strong>def</strong></em> <code>from_two_points(cls, p1: Point3, p2: Point3) -&gt; Line3</code> <a class="header-anchor" href="#def-from-two-points-cls-p1-point3-p2-point3-line3" aria-label="Permalink to &quot;***def*** \`from_two_points(cls, p1: Point3, p2: Point3) -&gt; Line3\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>p1 (<a href="./point.html#class-point3"><code>Point3</code></a>): 1</li><li>p2 (<a href="./point.html#class-point3"><code>Point3</code></a>): 2</li></ul></blockquote><p><strong>Return</strong>: <a href="./line.html#class-line3"><code>Line3</code></a>: 线</p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L199" target="_blank">View on 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.point.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="func-from-two-points-cls-p1-point3-p2-point3-line3" tabindex="-1"><em><strong>func</strong></em> <code>from_two_points(cls, p1: Point3, p2: Point3) -&gt; Line3</code> <a class="header-anchor" href="#func-from-two-points-cls-p1-point3-p2-point3-line3" aria-label="Permalink to &quot;***func*** \`from_two_points(cls, p1: Point3, p2: Point3) -&gt; Line3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>p1 (<a href="./point.html#class-point3"><code>Point3</code></a>): 1</li><li>p2 (<a href="./point.html#class-point3"><code>Point3</code></a>): 2</li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a>: 线</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L199" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> from_two_points</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(cls, p1: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, p2: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 工厂函数 由两点构造直线</span></span>
@ -148,7 +148,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> [\`Line3\`](./line#class-line3): 直线</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> direction </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p1</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(p1, direction)</span></span></code></pre></div></details><h4 id="def-and-self-other-line3-line3-point3-none" tabindex="-1"><em><strong>def</strong></em> <code>__and__(self, other: Line3) -&gt; Line3 | Point3 | None</code> <a class="header-anchor" href="#def-and-self-other-line3-line3-point3-none" aria-label="Permalink to &quot;***def*** \`__and__(self, other: Line3) -&gt; Line3 | Point3 | None\`&quot;"></a></h4><p><strong>Description</strong>: 线线线None线</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong>Return</strong>: <a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a> | <a href="https://docs.python.org/3/library/constants.html#None" target="_blank" rel="noreferrer"><code>None</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L211" target="_blank">View on 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;"> __and__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3 | Point3 | None&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(p1, direction)</span></span></code></pre></div></details><h4 id="func-and-self-other-line3-line3-point3-none" tabindex="-1"><em><strong>func</strong></em> <code>__and__(self, other: Line3) -&gt; Line3 | Point3 | None</code> <a class="header-anchor" href="#func-and-self-other-line3-line3-point3-none" aria-label="Permalink to &quot;***func*** \`__and__(self, other: Line3) -&gt; Line3 | Point3 | None\`&quot;"></a></h4><p><strong></strong>: 线线线None线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a> | <a href="https://docs.python.org/3/library/constants.html#None" target="_blank" rel="noreferrer"><code>None</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L211" 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;"> __and__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3 | Point3 | None&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 计算两条直线点集合的交集重合线返回自身平行线返回None交线返回交点</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -161,7 +161,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.is_parallel(other) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">or</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> not</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.is_coplanar(other):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> None</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>
<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;">.cal_intersection(other)</span></span></code></pre></div></details><h4 id="def-eq-self-other-bool" tabindex="-1"><em><strong>def</strong></em> <code>__eq__(self, other) -&gt; bool</code> <a class="header-anchor" href="#def-eq-self-other-bool" aria-label="Permalink to &quot;***def*** \`__eq__(self, other) -&gt; bool\`&quot;"></a></h4><p><strong>Description</strong>: 线</p><p>v1 // v2 (p1 - p2) // v1</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong>Return</strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b>Source code</b> or <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L226" target="_blank">View on 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) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.cal_intersection(other)</span></span></code></pre></div></details><h4 id="func-eq-self-other-bool" tabindex="-1"><em><strong>func</strong></em> <code>__eq__(self, other) -&gt; bool</code> <a class="header-anchor" href="#func-eq-self-other-bool" aria-label="Permalink to &quot;***func*** \`__eq__(self, other) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: 线</p><p>v1 // v2 (p1 - p2) // v1</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/line.py#L226" 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) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 判断两条直线是否等价</span></span>
<span class="line"></span>

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/plane.md","filePath":"ja/api/mp_math/plane.md"}'),l={name:"ja/api/mp_math/plane.md"},t=n(`<h1 id="mbcp-mp-math-plane" tabindex="-1">mbcp.mp_math.plane <a class="header-anchor" href="#mbcp-mp-math-plane" aria-label="Permalink to &quot;mbcp.mp_math.plane&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了三维空间中的平面类</p><h3 id="class-plane3" tabindex="-1"><em><strong>class</strong></em> <code>Plane3</code> <a class="header-anchor" href="#class-plane3" aria-label="Permalink to &quot;***class*** \`Plane3\`&quot;"></a></h3><h4 id="def-init-self-a-float-b-float-c-float-d-float" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, a: float, b: float, c: float, d: float)</code> <a class="header-anchor" href="#def-init-self-a-float-b-float-c-float-d-float" aria-label="Permalink to &quot;***def*** \`__init__(self, a: float, b: float, c: float, d: float)\`&quot;"></a></h4><p><strong>説明</strong>: 平面方程ax + by + cz + d = 0</p><p><strong>引数</strong>:</p><blockquote><ul><li>a (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): x系数</li><li>b (<code>float</code>): y系数</li><li>c (<code>float</code>): z系数</li><li>d (<code>float</code>): 常数项</li></ul></blockquote><details><summary><b>ソースコード</b> または <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L20" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, a: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, b: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, c: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, d: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/plane.md","filePath":"ja/api/mp_math/plane.md"}'),l={name:"ja/api/mp_math/plane.md"},t=n(`<h1 id="mbcp-mp-math-plane" tabindex="-1">mbcp.mp_math.plane <a class="header-anchor" href="#mbcp-mp-math-plane" aria-label="Permalink to &quot;mbcp.mp_math.plane&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了三维空间中的平面类</p><h3 id="class-plane3" tabindex="-1"><em><strong>class</strong></em> <code>Plane3</code> <a class="header-anchor" href="#class-plane3" aria-label="Permalink to &quot;***class*** \`Plane3\`&quot;"></a></h3><h4 id="func-init-self-a-float-b-float-c-float-d-float" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, a: float, b: float, c: float, d: float)</code> <a class="header-anchor" href="#func-init-self-a-float-b-float-c-float-d-float" aria-label="Permalink to &quot;***func*** \`__init__(self, a: float, b: float, c: float, d: float)\`&quot;"></a></h4><p><strong>説明</strong>: 平面方程ax + by + cz + d = 0</p><p><strong>引数</strong>:</p><blockquote><ul><li>a (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): x系数</li><li>b (<code>float</code>): y系数</li><li>c (<code>float</code>): z系数</li><li>d (<code>float</code>): 常数项</li></ul></blockquote><details><summary><b>ソースコード</b> または <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L20" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, a: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, b: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, c: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, d: </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;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 平面方程ax + by + cz + d = 0</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -10,7 +10,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> a</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.b </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> b</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> c</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.d </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> d</span></span></code></pre></div></details><h4 id="def-approx-self-other-plane3-bool" tabindex="-1"><em><strong>def</strong></em> <code>approx(self, other: Plane3) -&gt; bool</code> <a class="header-anchor" href="#def-approx-self-other-plane3-bool" aria-label="Permalink to &quot;***def*** \`approx(self, other: Plane3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L34" 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.d </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> d</span></span></code></pre></div></details><h4 id="func-approx-self-other-plane3-bool" tabindex="-1"><em><strong>func</strong></em> <code>approx(self, other: Plane3) -&gt; bool</code> <a class="header-anchor" href="#func-approx-self-other-plane3-bool" aria-label="Permalink to &quot;***func*** \`approx(self, other: Plane3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L34" 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -28,7 +28,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> k </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.c </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;">.c</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> approx(other.a, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> k) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> approx(other.b, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.b </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> k) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> approx(other.d, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.d </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> k)</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> False</span></span></code></pre></div></details><h4 id="def-cal-angle-self-other-line3-plane3-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>cal_angle(self, other: Line3 | Plane3) -&gt; AnyAngle</code> <a class="header-anchor" href="#def-cal-angle-self-other-line3-plane3-anyangle" aria-label="Permalink to &quot;***def*** \`cal_angle(self, other: Line3 | Plane3) -&gt; AnyAngle\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./plane.html#class-plane3"><code>Plane3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./angle.html#class-anyangle"><code>AnyAngle</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L54" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_angle</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3 | Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> False</span></span></code></pre></div></details><h4 id="func-cal-angle-self-other-line3-plane3-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>cal_angle(self, other: Line3 | Plane3) -&gt; AnyAngle</code> <a class="header-anchor" href="#func-cal-angle-self-other-line3-plane3-anyangle" aria-label="Permalink to &quot;***func*** \`cal_angle(self, other: Line3 | Plane3) -&gt; AnyAngle\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./plane.html#class-plane3"><code>Plane3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./angle.html#class-anyangle"><code>AnyAngle</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L54" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_angle</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3 | Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -43,7 +43,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other, Plane3):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> AnyAngle(math.acos(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.normal </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">@</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.normal </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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.normal.length </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.normal.length)), </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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> else</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-cal-distance-self-other-plane3-point3-float" tabindex="-1"><em><strong>def</strong></em> <code>cal_distance(self, other: Plane3 | Point3) -&gt; float</code> <a class="header-anchor" href="#def-cal-distance-self-other-plane3-point3-float" aria-label="Permalink to &quot;***def*** \`cal_distance(self, other: Plane3 | Point3) -&gt; float\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L71" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_distance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3 | Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </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:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-cal-distance-self-other-plane3-point3-float" tabindex="-1"><em><strong>func</strong></em> <code>cal_distance(self, other: Plane3 | Point3) -&gt; float</code> <a class="header-anchor" href="#func-cal-distance-self-other-plane3-point3-float" aria-label="Permalink to &quot;***func*** \`cal_distance(self, other: Plane3 | Point3) -&gt; float\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L71" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_distance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3 | Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </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;"> &quot;&quot;&quot;</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>
@ -58,7 +58,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other, Point3):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x </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;">.b </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y </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;">.c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z </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;">.d) </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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a </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;">.b </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;">.c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">**</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">**</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0.5</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-cal-intersection-line3-self-other-plane3-line3" tabindex="-1"><em><strong>def</strong></em> <code>cal_intersection_line3(self, other: Plane3) -&gt; Line3</code> <a class="header-anchor" href="#def-cal-intersection-line3-self-other-plane3-line3" aria-label="Permalink to &quot;***def*** \`cal_intersection_line3(self, other: Plane3) -&gt; Line3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a>: 线</p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#ValueError" target="_blank" rel="noreferrer"><code>ValueError</code></a> 线</li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L88" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_intersection_line3</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-cal-intersection-line3-self-other-plane3-line3" tabindex="-1"><em><strong>func</strong></em> <code>cal_intersection_line3(self, other: Plane3) -&gt; Line3</code> <a class="header-anchor" href="#func-cal-intersection-line3-self-other-plane3-line3" aria-label="Permalink to &quot;***func*** \`cal_intersection_line3(self, other: Plane3) -&gt; Line3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a>: 线</p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#ValueError" target="_blank" rel="noreferrer"><code>ValueError</code></a> 线</li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L88" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_intersection_line3</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -84,7 +84,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> A </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> np.array([[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.b], [other.a, other.b]])</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> B </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> np.array([</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;">.d, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">other.d])</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x, y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> np.linalg.solve(A, B)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Line3(Point3(x, y, z), direction)</span></span></code></pre></div></details><h4 id="def-cal-intersection-point3-self-other-line3-point3" tabindex="-1"><em><strong>def</strong></em> <code>cal_intersection_point3(self, other: Line3) -&gt; Point3</code> <a class="header-anchor" href="#def-cal-intersection-point3-self-other-line3-point3" aria-label="Permalink to &quot;***def*** \`cal_intersection_point3(self, other: Line3) -&gt; Point3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#ValueError" target="_blank" rel="noreferrer"><code>ValueError</code></a> 线</li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L121" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_intersection_point3</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</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;"> Line3(Point3(x, y, z), direction)</span></span></code></pre></div></details><h4 id="func-cal-intersection-point3-self-other-line3-point3" tabindex="-1"><em><strong>func</strong></em> <code>cal_intersection_point3(self, other: Line3) -&gt; Point3</code> <a class="header-anchor" href="#func-cal-intersection-point3-self-other-line3-point3" aria-label="Permalink to &quot;***func*** \`cal_intersection_point3(self, other: Line3) -&gt; Point3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#ValueError" target="_blank" rel="noreferrer"><code>ValueError</code></a> 线</li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L121" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_intersection_point3</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -98,7 +98,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ValueError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;The plane and the line are parallel or coincident.&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x, y, z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.get_parametric_equations()</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point.x </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;">.b </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point.y </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;">.c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.point.z </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;">.d) </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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.direction.x </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;">.b </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.direction.y </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;">.c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.direction.z)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(x(t), y(t), z(t))</span></span></code></pre></div></details><h4 id="def-cal-parallel-plane3-self-point-point3-plane3" tabindex="-1"><em><strong>def</strong></em> <code>cal_parallel_plane3(self, point: Point3) -&gt; Plane3</code> <a class="header-anchor" href="#def-cal-parallel-plane3-self-point-point3-plane3" aria-label="Permalink to &quot;***def*** \`cal_parallel_plane3(self, point: Point3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./plane.html#class-plane3"><code>Plane3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L141" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_parallel_plane3</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</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;"> Point3(x(t), y(t), z(t))</span></span></code></pre></div></details><h4 id="func-cal-parallel-plane3-self-point-point3-plane3" tabindex="-1"><em><strong>func</strong></em> <code>cal_parallel_plane3(self, point: Point3) -&gt; Plane3</code> <a class="header-anchor" href="#func-cal-parallel-plane3-self-point-point3-plane3" aria-label="Permalink to &quot;***func*** \`cal_parallel_plane3(self, point: Point3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./plane.html#class-plane3"><code>Plane3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L141" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_parallel_plane3</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -106,7 +106,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<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;"> [\`Plane3\`](./plane#class-plane3): 平面</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Plane3.from_point_and_normal(point, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.normal)</span></span></code></pre></div></details><h4 id="def-is-parallel-self-other-plane3-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_parallel(self, other: Plane3) -&gt; bool</code> <a class="header-anchor" href="#def-is-parallel-self-other-plane3-bool" aria-label="Permalink to &quot;***def*** \`is_parallel(self, other: Plane3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.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:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> is_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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;"> Plane3.from_point_and_normal(point, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.normal)</span></span></code></pre></div></details><h4 id="func-is-parallel-self-other-plane3-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_parallel(self, other: Plane3) -&gt; bool</code> <a class="header-anchor" href="#func-is-parallel-self-other-plane3-bool" aria-label="Permalink to &quot;***func*** \`is_parallel(self, other: Plane3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.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:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> is_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -114,14 +114,14 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否平行</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.normal.is_parallel(other.normal)</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="def-normal-self-vector3" tabindex="-1"><em><strong>def</strong></em> <code>normal(self) -&gt; Vector3</code> <a class="header-anchor" href="#def-normal-self-vector3" aria-label="Permalink to &quot;***def*** \`normal(self) -&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>: <a href="./vector.html#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L162" 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>
<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;">.normal.is_parallel(other.normal)</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="func-normal-self-vector3" tabindex="-1"><em><strong>func</strong></em> <code>normal(self) -&gt; Vector3</code> <a class="header-anchor" href="#func-normal-self-vector3" aria-label="Permalink to &quot;***func*** \`normal(self) -&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>: <a href="./vector.html#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L162" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> normal</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> [\`Vector3\`](./vector#class-vector3): 法向量</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.b, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.c)</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="def-from-point-and-normal-cls-point-point3-normal-vector3-plane3" tabindex="-1"><em><strong>def</strong></em> <code>from_point_and_normal(cls, point: Point3, normal: Vector3) -&gt; Plane3</code> <a class="header-anchor" href="#def-from-point-and-normal-cls-point-point3-normal-vector3-plane3" aria-label="Permalink to &quot;***def*** \`from_point_and_normal(cls, point: Point3, normal: Vector3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: ()</p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li><li>normal (<a href="./vector.html#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./plane.html#class-plane3"><code>Plane3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L171" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.a, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.b, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.c)</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="func-from-point-and-normal-cls-point-point3-normal-vector3-plane3" tabindex="-1"><em><strong>func</strong></em> <code>from_point_and_normal(cls, point: Point3, normal: Vector3) -&gt; Plane3</code> <a class="header-anchor" href="#func-from-point-and-normal-cls-point-point3-normal-vector3-plane3" aria-label="Permalink to &quot;***func*** \`from_point_and_normal(cls, point: Point3, normal: Vector3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: ()</p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li><li>normal (<a href="./vector.html#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./plane.html#class-plane3"><code>Plane3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L171" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> from_point_and_normal</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(cls, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, normal: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 工厂函数 由点和法向量构造平面(点法式构造)</span></span>
@ -133,7 +133,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> a, b, c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (normal.x, normal.y, normal.z)</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> d </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> -</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">a </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> point.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> b </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> point.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> c </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> point.z</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(a, b, c, d)</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="def-from-three-points-cls-p1-point3-p2-point3-p3-point3-plane3" tabindex="-1"><em><strong>def</strong></em> <code>from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -&gt; Plane3</code> <a class="header-anchor" href="#def-from-three-points-cls-p1-point3-p2-point3-p3-point3-plane3" aria-label="Permalink to &quot;***def*** \`from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>p1 (<a href="./point.html#class-point3"><code>Point3</code></a>): 1</li><li>p2 (<code>Point3</code>): 2</li><li>p3 (<code>Point3</code>): 3</li></ul></blockquote><p><strong></strong>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L185" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(a, b, c, d)</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="func-from-three-points-cls-p1-point3-p2-point3-p3-point3-plane3" tabindex="-1"><em><strong>func</strong></em> <code>from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -&gt; Plane3</code> <a class="header-anchor" href="#func-from-three-points-cls-p1-point3-p2-point3-p3-point3-plane3" aria-label="Permalink to &quot;***func*** \`from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>p1 (<a href="./point.html#class-point3"><code>Point3</code></a>): 1</li><li>p2 (<code>Point3</code>): 2</li><li>p3 (<code>Point3</code>): 3</li></ul></blockquote><p><strong></strong>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L185" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> from_three_points</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(cls, p1: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, p2: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, p3: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 工厂函数 由三点构造平面</span></span>
@ -147,7 +147,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> v1 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p1</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> v2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p3 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p1</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> normal </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> v1.cross(v2)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.from_point_and_normal(p1, normal)</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="def-from-two-lines-cls-l1-line3-l2-line3-plane3" tabindex="-1"><em><strong>def</strong></em> <code>from_two_lines(cls, l1: Line3, l2: Line3) -&gt; Plane3</code> <a class="header-anchor" href="#def-from-two-lines-cls-l1-line3-l2-line3-plane3" aria-label="Permalink to &quot;***def*** \`from_two_lines(cls, l1: Line3, l2: Line3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>l1 (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li><li>l2 (<code>Line3</code>): 线</li></ul></blockquote><p><strong></strong>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L203" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.from_point_and_normal(p1, normal)</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="func-from-two-lines-cls-l1-line3-l2-line3-plane3" tabindex="-1"><em><strong>func</strong></em> <code>from_two_lines(cls, l1: Line3, l2: Line3) -&gt; Plane3</code> <a class="header-anchor" href="#func-from-two-lines-cls-l1-line3-l2-line3-plane3" aria-label="Permalink to &quot;***func*** \`from_two_lines(cls, l1: Line3, l2: Line3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>l1 (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li><li>l2 (<code>Line3</code>): 线</li></ul></blockquote><p><strong></strong>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L203" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> from_two_lines</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(cls, l1: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, l2: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 工厂函数 由两直线构造平面</span></span>
@ -161,7 +161,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> v2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> l2.point </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> l1.point</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> v2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> zero_vector3:</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> v2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> l2.get_point(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> l1.point</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.from_point_and_normal(l1.point, v1.cross(v2))</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="def-from-point-and-line-cls-point-point3-line-line3-plane3" tabindex="-1"><em><strong>def</strong></em> <code>from_point_and_line(cls, point: Point3, line: Line3) -&gt; Plane3</code> <a class="header-anchor" href="#def-from-point-and-line-cls-point-point3-line-line3-plane3" aria-label="Permalink to &quot;***def*** \`from_point_and_line(cls, point: Point3, line: Line3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li><li>line (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L219" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.from_point_and_normal(l1.point, v1.cross(v2))</span></span></code></pre></div></details><p><a href="https://docs.python.org/3/library/functions.html#classmethod" target="_blank" rel="noreferrer"><code>@classmethod</code></a></p><h4 id="func-from-point-and-line-cls-point-point3-line-line3-plane3" tabindex="-1"><em><strong>func</strong></em> <code>from_point_and_line(cls, point: Point3, line: Line3) -&gt; Plane3</code> <a class="header-anchor" href="#func-from-point-and-line-cls-point-point3-line-line3-plane3" aria-label="Permalink to &quot;***func*** \`from_point_and_line(cls, point: Point3, line: Line3) -&gt; Plane3\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>point (<a href="./point.html#class-point3"><code>Point3</code></a>): </li><li>line (<a href="./line.html#class-line3"><code>Line3</code></a>): 线</li></ul></blockquote><p><strong></strong>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L219" 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;">classmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> from_point_and_line</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(cls, point: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, line: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 工厂函数 由点和直线构造平面</span></span>
@ -171,11 +171,11 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<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;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.from_point_and_normal(point, line.direction)</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-and-self-other-line3-point3-none" tabindex="-1"><em><strong>def</strong></em> <code>__and__(self, other: Line3) -&gt; Point3 | None</code> <a class="header-anchor" href="#def-and-self-other-line3-point3-none" aria-label="Permalink to &quot;***def*** \`__and__(self, other: Line3) -&gt; Point3 | None\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L256" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> cls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.from_point_and_normal(point, line.direction)</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-and-self-other-line3-point3-none" tabindex="-1"><em><strong>func</strong></em> <code>__and__(self, other: Line3) -&gt; Point3 | None</code> <a class="header-anchor" href="#func-and-self-other-line3-point3-none" aria-label="Permalink to &quot;***func*** \`__and__(self, other: Line3) -&gt; Point3 | None\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L256" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __and__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3 | None&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-and-self-other-plane3-line3-none" tabindex="-1"><em><strong>def</strong></em> <code>__and__(self, other: Plane3) -&gt; Line3 | None</code> <a class="header-anchor" href="#def-and-self-other-plane3-line3-none" aria-label="Permalink to &quot;***def*** \`__and__(self, other: Plane3) -&gt; Line3 | None\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L260" 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-and-self-other-plane3-line3-none" tabindex="-1"><em><strong>func</strong></em> <code>__and__(self, other: Plane3) -&gt; Line3 | None</code> <a class="header-anchor" href="#func-and-self-other-plane3-line3-none" aria-label="Permalink to &quot;***func*** \`__and__(self, other: Plane3) -&gt; Line3 | None\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L260" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __and__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Plane3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3 | None&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="def-and-self-other" tabindex="-1"><em><strong>def</strong></em> <code>__and__(self, other)</code> <a class="header-anchor" href="#def-and-self-other" aria-label="Permalink to &quot;***def*** \`__and__(self, other)\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./plane.html#class-plane3"><code>Plane3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a> | <a href="https://docs.python.org/3/library/constants.html#None" target="_blank" rel="noreferrer"><code>None</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L263" 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;"> __and__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other):</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="func-and-self-other" tabindex="-1"><em><strong>func</strong></em> <code>__and__(self, other)</code> <a class="header-anchor" href="#func-and-self-other" aria-label="Permalink to &quot;***func*** \`__and__(self, other)\`&quot;"></a></h4><p><strong></strong>: 线</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./plane.html#class-plane3"><code>Plane3</code></a>): 线</li></ul></blockquote><p><strong></strong>: <a href="./line.html#class-line3"><code>Line3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a> | <a href="https://docs.python.org/3/library/constants.html#None" target="_blank" rel="noreferrer"><code>None</code></a>: </p><p><strong></strong>:</p><blockquote><ul><li><a href="https://docs.python.org/3/library/exceptions.html#TypeError" target="_blank" rel="noreferrer"><code>TypeError</code></a> </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L263" 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;"> __and__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -194,7 +194,7 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> None</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;">.cal_intersection_point3(other)</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for &amp;: &#39;Plane3&#39; and &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-eq-self-other-bool" tabindex="-1"><em><strong>def</strong></em> <code>__eq__(self, other) -&gt; bool</code> <a class="header-anchor" href="#def-eq-self-other-bool" aria-label="Permalink to &quot;***def*** \`__eq__(self, other) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L284" 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) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for &amp;: &#39;Plane3&#39; and &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-eq-self-other-bool" tabindex="-1"><em><strong>func</strong></em> <code>__eq__(self, other) -&gt; bool</code> <a class="header-anchor" href="#func-eq-self-other-bool" aria-label="Permalink to &quot;***func*** \`__eq__(self, other) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./plane.html#class-plane3"><code>Plane3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L284" 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) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -202,5 +202,5 @@ import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否等价</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.approx(other)</span></span></code></pre></div></details><h4 id="def-rand-self-other-line3-point3" tabindex="-1"><em><strong>def</strong></em> <code>__rand__(self, other: Line3) -&gt; Point3</code> <a class="header-anchor" href="#def-rand-self-other-line3-point3" aria-label="Permalink to &quot;***def*** \`__rand__(self, other: Line3) -&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L294" 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;"> __rand__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.cal_intersection_point3(other)</span></span></code></pre></div></details>`,113),h=[t];function p(e,k,r,o,d,E){return a(),i("div",null,h)}const F=s(l,[["render",p]]);export{y as __pageData,F as default};
<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;">.approx(other)</span></span></code></pre></div></details><h4 id="func-rand-self-other-line3-point3" tabindex="-1"><em><strong>func</strong></em> <code>__rand__(self, other: Line3) -&gt; Point3</code> <a class="header-anchor" href="#func-rand-self-other-line3-point3" aria-label="Permalink to &quot;***func*** \`__rand__(self, other: Line3) -&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/plane.py#L294" 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;"> __rand__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Line3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.cal_intersection_point3(other)</span></span></code></pre></div></details>`,113),h=[t];function p(e,k,r,o,d,E){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{c as __pageData,y as default};

View File

@ -1 +1 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/plane.md","filePath":"ja/api/mp_math/plane.md"}'),l={name:"ja/api/mp_math/plane.md"},t=n("",113),h=[t];function p(e,k,r,o,d,E){return a(),i("div",null,h)}const F=s(l,[["render",p]]);export{y as __pageData,F as default};
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const c=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/plane.md","filePath":"ja/api/mp_math/plane.md"}'),l={name:"ja/api/mp_math/plane.md"},t=n("",113),h=[t];function p(e,k,r,o,d,E){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{c as __pageData,y as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/point.md","filePath":"ja/api/mp_math/point.md"}'),n={name:"ja/api/mp_math/point.md"},l=t(`<h1 id="mbcp-mp-math-point" tabindex="-1">mbcp.mp_math.point <a class="header-anchor" href="#mbcp-mp-math-point" aria-label="Permalink to &quot;mbcp.mp_math.point&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了三维空间中点的类。</p><h3 id="class-point3" tabindex="-1"><em><strong>class</strong></em> <code>Point3</code> <a class="header-anchor" href="#class-point3" aria-label="Permalink to &quot;***class*** \`Point3\`&quot;"></a></h3><h4 id="def-init-self-x-float-y-float-z-float" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, x: float, y: float, z: float)</code> <a class="header-anchor" href="#def-init-self-x-float-y-float-z-float" aria-label="Permalink to &quot;***def*** \`__init__(self, x: float, y: float, z: float)\`&quot;"></a></h4><p><strong>説明</strong>: 笛卡尔坐标系中的点。</p><p><strong>引数</strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): x 坐标</li><li>y (<code>float</code>): y 坐标</li><li>z (<code>float</code>): z 坐标</li></ul></blockquote><details><summary><b>ソースコード</b> または <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L15" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, z: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/point.md","filePath":"ja/api/mp_math/point.md"}'),n={name:"ja/api/mp_math/point.md"},l=t(`<h1 id="mbcp-mp-math-point" tabindex="-1">mbcp.mp_math.point <a class="header-anchor" href="#mbcp-mp-math-point" aria-label="Permalink to &quot;mbcp.mp_math.point&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了三维空间中点的类。</p><h3 id="class-point3" tabindex="-1"><em><strong>class</strong></em> <code>Point3</code> <a class="header-anchor" href="#class-point3" aria-label="Permalink to &quot;***class*** \`Point3\`&quot;"></a></h3><h4 id="func-init-self-x-float-y-float-z-float" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, x: float, y: float, z: float)</code> <a class="header-anchor" href="#func-init-self-x-float-y-float-z-float" aria-label="Permalink to &quot;***func*** \`__init__(self, x: float, y: float, z: float)\`&quot;"></a></h4><p><strong>説明</strong>: 笛卡尔坐标系中的点。</p><p><strong>引数</strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): x 坐标</li><li>y (<code>float</code>): y 坐标</li><li>z (<code>float</code>): z 坐标</li></ul></blockquote><details><summary><b>ソースコード</b> または <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L15" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, z: </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;"> &quot;&quot;&quot;</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>
@ -8,7 +8,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> y</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> z</span></span></code></pre></div></details><h4 id="def-approx-self-other-point3-epsilon-float-approx-bool" tabindex="-1"><em><strong>def</strong></em> <code>approx(self, other: Point3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#def-approx-self-other-point3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***def*** \`approx(self, other: Point3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L27" 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> z</span></span></code></pre></div></details><h4 id="func-approx-self-other-point3-epsilon-float-approx-bool" tabindex="-1"><em><strong>func</strong></em> <code>approx(self, other: Point3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#func-approx-self-other-point3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***func*** \`approx(self, other: Point3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L27" 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -17,11 +17,11 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`bool\`](https://docs.python.org/3/library/functions.html#bool): 是否近似相等</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> all</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon])</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-vector3-point3" tabindex="-1"><em><strong>def</strong></em> <code>self + other: Vector3 =&gt; Point3</code> <a class="header-anchor" href="#def-self-other-vector3-point3" aria-label="Permalink to &quot;***def*** \`self + other: Vector3 =&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L47" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> all</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon])</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-vector3-point3" tabindex="-1"><em><strong>func</strong></em> <code>self + other: Vector3 =&gt; Point3</code> <a class="header-anchor" href="#func-self-other-vector3-point3" aria-label="Permalink to &quot;***func*** \`self + other: Vector3 =&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L47" 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>
<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;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-point3-point3" tabindex="-1"><em><strong>def</strong></em> <code>self + other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#def-self-other-point3-point3" aria-label="Permalink to &quot;***def*** \`self + other: Point3 =&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L51" 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-point3-point3" tabindex="-1"><em><strong>func</strong></em> <code>self + other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#func-self-other-point3-point3" aria-label="Permalink to &quot;***func*** \`self + other: Point3 =&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L51" 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>
<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;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="def-self-other" tabindex="-1"><em><strong>def</strong></em> <code>self + other</code> <a class="header-anchor" href="#def-self-other" aria-label="Permalink to &quot;***def*** \`self + other\`&quot;"></a></h4><p><strong></strong>: P + V -&gt; P P + P -&gt; P</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./vector.html#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L54" 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="func-self-other" tabindex="-1"><em><strong>func</strong></em> <code>self + other</code> <a class="header-anchor" href="#func-self-other" aria-label="Permalink to &quot;***func*** \`self + other\`&quot;"></a></h4><p><strong></strong>: P + V -&gt; P P + P -&gt; P</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./vector.html#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L54" 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>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> P + V -&gt; P</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> P + P -&gt; P</span></span>
@ -30,7 +30,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`Point3\`](./point#class-point3): 新的点</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</span></span></code></pre></div></details><h4 id="def-eq-self-other" tabindex="-1"><em><strong>def</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#def-eq-self-other" aria-label="Permalink to &quot;***def*** \`__eq__(self, other)\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L65" 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;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</span></span></code></pre></div></details><h4 id="func-eq-self-other" tabindex="-1"><em><strong>func</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#func-eq-self-other" aria-label="Permalink to &quot;***func*** \`__eq__(self, other)\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L65" 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:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -38,7 +38,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`bool\`](https://docs.python.org/3/library/functions.html#bool): 是否相等</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.x, other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.y, other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.z, other.z)</span></span></code></pre></div></details><h4 id="def-self-other-point3-vector3" tabindex="-1"><em><strong>def</strong></em> <code>self - other: Point3 =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-point3-vector3" aria-label="Permalink to &quot;***def*** \`self - other: Point3 =&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: P - P -&gt; V</p><p>P - V -&gt; P <a href="./vector.html#class-vector3"><code>Vector3</code></a> </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./vector.html#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.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:#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;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</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;"> approx(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x, other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.y, other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.z, other.z)</span></span></code></pre></div></details><h4 id="func-self-other-point3-vector3" tabindex="-1"><em><strong>func</strong></em> <code>self - other: Point3 =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-point3-vector3" aria-label="Permalink to &quot;***func*** \`self - other: Point3 =&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: P - P -&gt; V</p><p>P - V -&gt; P <a href="./vector.html#class-vector3"><code>Vector3</code></a> </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./vector.html#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.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:#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;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> P - P -&gt; V</span></span>
<span class="line"></span>
@ -49,4 +49,4 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> [\`Vector3\`](./vector#class-vector3): 新的向量</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> from</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> .vector </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</span></span></code></pre></div></details>`,39),h=[l];function e(p,k,o,r,d,g){return a(),i("div",null,h)}const y=s(n,[["render",e]]);export{E as __pageData,y as default};
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</span></span></code></pre></div></details>`,39),h=[l];function p(e,k,o,r,d,c){return a(),i("div",null,h)}const y=s(n,[["render",p]]);export{E as __pageData,y as default};

View File

@ -1 +1 @@
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/point.md","filePath":"ja/api/mp_math/point.md"}'),n={name:"ja/api/mp_math/point.md"},l=t("",39),h=[l];function e(p,k,o,r,d,g){return a(),i("div",null,h)}const y=s(n,[["render",e]]);export{E as __pageData,y as default};
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/point.md","filePath":"ja/api/mp_math/point.md"}'),n={name:"ja/api/mp_math/point.md"},l=t("",39),h=[l];function p(e,k,o,r,d,c){return a(),i("div",null,h)}const y=s(n,[["render",p]]);export{E as __pageData,y as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/segment.md","filePath":"ja/api/mp_math/segment.md"}'),t={name:"ja/api/mp_math/segment.md"},p=n(`<h1 id="mbcp-mp-math-segment" tabindex="-1">mbcp.mp_math.segment <a class="header-anchor" href="#mbcp-mp-math-segment" aria-label="Permalink to &quot;mbcp.mp_math.segment&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了三维空间中的线段类</p><h3 id="class-segment3" tabindex="-1"><em><strong>class</strong></em> <code>Segment3</code> <a class="header-anchor" href="#class-segment3" aria-label="Permalink to &quot;***class*** \`Segment3\`&quot;"></a></h3><h4 id="def-init-self-p1-point3-p2-point3" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, p1: Point3, p2: Point3)</code> <a class="header-anchor" href="#def-init-self-p1-point3-p2-point3" aria-label="Permalink to &quot;***def*** \`__init__(self, p1: Point3, p2: Point3)\`&quot;"></a></h4><p><strong>説明</strong>: 三维空间中的线段。</p><p><strong>引数</strong>:</p><blockquote><ul><li>p1 (<a href="./point.html#class-point3"><code>Point3</code></a>): 线段的一个端点</li><li>p2 (<a href="./point.html#class-point3"><code>Point3</code></a>): 线段的另一个端点</li></ul></blockquote><details><summary><b>ソースコード</b> または <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/segment.py#L14" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, p1: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, p2: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/segment.md","filePath":"ja/api/mp_math/segment.md"}'),t={name:"ja/api/mp_math/segment.md"},p=n(`<h1 id="mbcp-mp-math-segment" tabindex="-1">mbcp.mp_math.segment <a class="header-anchor" href="#mbcp-mp-math-segment" aria-label="Permalink to &quot;mbcp.mp_math.segment&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了三维空间中的线段类</p><h3 id="class-segment3" tabindex="-1"><em><strong>class</strong></em> <code>Segment3</code> <a class="header-anchor" href="#class-segment3" aria-label="Permalink to &quot;***class*** \`Segment3\`&quot;"></a></h3><h4 id="func-init-self-p1-point3-p2-point3" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, p1: Point3, p2: Point3)</code> <a class="header-anchor" href="#func-init-self-p1-point3-p2-point3" aria-label="Permalink to &quot;***func*** \`__init__(self, p1: Point3, p2: Point3)\`&quot;"></a></h4><p><strong>説明</strong>: 三维空间中的线段。</p><p><strong>引数</strong>:</p><blockquote><ul><li>p1 (<a href="./point.html#class-point3"><code>Point3</code></a>): 线段的一个端点</li><li>p2 (<a href="./point.html#class-point3"><code>Point3</code></a>): 线段的另一个端点</li></ul></blockquote><details><summary><b>ソースコード</b> または <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/segment.py#L14" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, p1: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, p2: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/utils.md","filePath":"ja/api/mp_math/utils.md"}'),n={name:"ja/api/mp_math/utils.md"},l=t(`<h1 id="mbcp-mp-math-utils" tabindex="-1">mbcp.mp_math.utils <a class="header-anchor" href="#mbcp-mp-math-utils" aria-label="Permalink to &quot;mbcp.mp_math.utils&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了一些常用的工具函数</p><h3 id="def-clamp-x-float-min-float-max-float-float" tabindex="-1"><em><strong>def</strong></em> <code>clamp(x: float, min_: float, max_: float) -&gt; float</code> <a class="header-anchor" href="#def-clamp-x-float-min-float-max-float-float" aria-label="Permalink to &quot;***def*** \`clamp(x: float, min_: float, max_: float) -&gt; float\`&quot;"></a></h3><p><strong>説明</strong>: 区间限定函数</p><p><strong>引数</strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): 值</li><li>min_ (<code>float</code>): 最小值</li><li>max_ (<code>float</code>): 最大值</li></ul></blockquote><p><strong>戻り値</strong>: <code>float</code>: 限定在区间内的值</p><details><summary><b>ソースコード</b> または <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L17" 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:#6F42C1;--shiki-dark:#B392F0;"> clamp</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, min_: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, max_: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/utils.md","filePath":"ja/api/mp_math/utils.md"}'),n={name:"ja/api/mp_math/utils.md"},l=t(`<h1 id="mbcp-mp-math-utils" tabindex="-1">mbcp.mp_math.utils <a class="header-anchor" href="#mbcp-mp-math-utils" aria-label="Permalink to &quot;mbcp.mp_math.utils&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了一些常用的工具函数</p><h3 id="func-clamp-x-float-min-float-max-float-float" tabindex="-1"><em><strong>func</strong></em> <code>clamp(x: float, min_: float, max_: float) -&gt; float</code> <a class="header-anchor" href="#func-clamp-x-float-min-float-max-float-float" aria-label="Permalink to &quot;***func*** \`clamp(x: float, min_: float, max_: float) -&gt; float\`&quot;"></a></h3><p><strong>説明</strong>: 区间限定函数</p><p><strong>引数</strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): 值</li><li>min_ (<code>float</code>): 最小值</li><li>max_ (<code>float</code>): 最大值</li></ul></blockquote><p><strong>戻り値</strong>: <code>float</code>: 限定在区间内的值</p><details><summary><b>ソースコード</b> または <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L17" 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:#6F42C1;--shiki-dark:#B392F0;"> clamp</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, min_: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, max_: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </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;"> &quot;&quot;&quot;</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>
@ -9,13 +9,13 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> \`float\`: 限定在区间内的值</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> max</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">min</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x, max_), min_)</span></span></code></pre></div></details><h3 id="class-approx" tabindex="-1"><em><strong>class</strong></em> <code>Approx</code> <a class="header-anchor" href="#class-approx" aria-label="Permalink to &quot;***class*** \`Approx\`&quot;"></a></h3><h4 id="def-init-self-value-realnumber" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, value: RealNumber)</code> <a class="header-anchor" href="#def-init-self-value-realnumber" aria-label="Permalink to &quot;***def*** \`__init__(self, value: RealNumber)\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>value (<a href="./mp_math_typing.html#realnumber"><code>RealNumber</code></a>): </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L36" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, value: RealNumber):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> max</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">min</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x, max_), min_)</span></span></code></pre></div></details><h3 id="class-approx" tabindex="-1"><em><strong>class</strong></em> <code>Approx</code> <a class="header-anchor" href="#class-approx" aria-label="Permalink to &quot;***class*** \`Approx\`&quot;"></a></h3><h4 id="func-init-self-value-realnumber" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, value: RealNumber)</code> <a class="header-anchor" href="#func-init-self-value-realnumber" aria-label="Permalink to &quot;***func*** \`__init__(self, value: RealNumber)\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>value (<a href="./mp_math_typing.html#realnumber"><code>RealNumber</code></a>): </li></ul></blockquote><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L36" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, value: RealNumber):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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 ([\`RealNumber\`](./mp_math_typing#realnumber)): 实数</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> value</span></span></code></pre></div></details><h4 id="def-eq-self-other" tabindex="-1"><em><strong>def</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#def-eq-self-other" aria-label="Permalink to &quot;***def*** \`__eq__(self, other)\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L44" 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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> value</span></span></code></pre></div></details><h4 id="func-eq-self-other" tabindex="-1"><em><strong>func</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#func-eq-self-other" aria-label="Permalink to &quot;***func*** \`__eq__(self, other)\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L44" 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;"> if</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value, (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">int</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)):</span></span>
<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, (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">int</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:#005CC5;--shiki-dark:#79B8FF;"> abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> APPROX</span></span>
@ -25,9 +25,9 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F
<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, (Vector3, Point3, Plane3, Line3)):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> all</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;">.value.x, other.x), approx(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value.y, other.y), approx(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value.z, other.z)])</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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.raise_type_error(other)</span></span></code></pre></div></details><h4 id="def-raise-type-error-self-other" tabindex="-1"><em><strong>def</strong></em> <code>raise_type_error(self, other)</code> <a class="header-anchor" href="#def-raise-type-error-self-other" aria-label="Permalink to &quot;***def*** \`raise_type_error(self, other)\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L56" 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:#6F42C1;--shiki-dark:#B392F0;"> raise_type_error</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> and </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-ne-self-other" tabindex="-1"><em><strong>def</strong></em> <code>__ne__(self, other)</code> <a class="header-anchor" href="#def-ne-self-other" aria-label="Permalink to &quot;***def*** \`__ne__(self, other)\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L59" 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;"> __ne__</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:#D73A49;--shiki-dark:#F97583;"> not</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">__eq__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span></span></code></pre></div></details><h3 id="def-approx-x-float-y-float-0-0-epsilon-float-approx-bool" tabindex="-1"><em><strong>def</strong></em> <code>approx(x: float, y: float = 0.0, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#def-approx-x-float-y-float-0-0-epsilon-float-approx-bool" aria-label="Permalink to &quot;***def*** \`approx(x: float, y: float = 0.0, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h3><p><strong></strong>: 0</p><p><strong></strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): 1</li><li>y (<code>float</code>): 2</li><li>epsilon (<code>float</code>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L63" 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.raise_type_error(other)</span></span></code></pre></div></details><h4 id="func-raise-type-error-self-other" tabindex="-1"><em><strong>func</strong></em> <code>raise_type_error(self, other)</code> <a class="header-anchor" href="#func-raise-type-error-self-other" aria-label="Permalink to &quot;***func*** \`raise_type_error(self, other)\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L56" 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:#6F42C1;--shiki-dark:#B392F0;"> raise_type_error</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Unsupported type: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.value)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> and </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-ne-self-other" tabindex="-1"><em><strong>func</strong></em> <code>__ne__(self, other)</code> <a class="header-anchor" href="#func-ne-self-other" aria-label="Permalink to &quot;***func*** \`__ne__(self, other)\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L59" 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;"> __ne__</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:#D73A49;--shiki-dark:#F97583;"> not</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">__eq__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span></span></code></pre></div></details><h3 id="func-approx-x-float-y-float-0-0-epsilon-float-approx-bool" tabindex="-1"><em><strong>func</strong></em> <code>approx(x: float, y: float = 0.0, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#func-approx-x-float-y-float-0-0-epsilon-float-approx-bool" aria-label="Permalink to &quot;***func*** \`approx(x: float, y: float = 0.0, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h3><p><strong></strong>: 0</p><p><strong></strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): 1</li><li>y (<code>float</code>): 2</li><li>epsilon (<code>float</code>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L63" 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:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 判断两个数是否近似相等或包装一个实数用于判断是否近似于0</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -37,7 +37,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F
<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;"> [\`bool\`](https://docs.python.org/3/library/functions.html#bool): 是否近似相等</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon</span></span></code></pre></div></details><h3 id="def-sign-x-float-only-neg-bool-false-str" tabindex="-1"><em><strong>def</strong></em> <code>sign(x: float, only_neg: bool = False) -&gt; str</code> <a class="header-anchor" href="#def-sign-x-float-only-neg-bool-false-str" aria-label="Permalink to &quot;***def*** \`sign(x: float, only_neg: bool = False) -&gt; str\`&quot;"></a></h3><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li><li>only_neg (<a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#str" target="_blank" rel="noreferrer"><code>str</code></a>: + - &quot;&quot;</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L76" 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:#6F42C1;--shiki-dark:#B392F0;"> sign</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, only_neg: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">False</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</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:#005CC5;--shiki-dark:#79B8FF;"> abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon</span></span></code></pre></div></details><h3 id="func-sign-x-float-only-neg-bool-false-str" tabindex="-1"><em><strong>func</strong></em> <code>sign(x: float, only_neg: bool = False) -&gt; str</code> <a class="header-anchor" href="#func-sign-x-float-only-neg-bool-false-str" aria-label="Permalink to &quot;***func*** \`sign(x: float, only_neg: bool = False) -&gt; str\`&quot;"></a></h3><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li><li>only_neg (<a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#str" target="_blank" rel="noreferrer"><code>str</code></a>: + - &quot;&quot;</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L76" 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:#6F42C1;--shiki-dark:#B392F0;"> sign</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, only_neg: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">False</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;获取数的符号</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;"> x ([\`float\`](https://docs.python.org/3/library/functions.html#float)): 数</span></span>
@ -50,7 +50,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</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:#032F62;--shiki-dark:#9ECBFF;"> &#39;-&#39;</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;&#39;</span></span></code></pre></div></details><h3 id="def-sign-format-x-float-only-neg-bool-false-str" tabindex="-1"><em><strong>def</strong></em> <code>sign_format(x: float, only_neg: bool = False) -&gt; str</code> <a class="header-anchor" href="#def-sign-format-x-float-only-neg-bool-false-str" aria-label="Permalink to &quot;***def*** \`sign_format(x: float, only_neg: bool = False) -&gt; str\`&quot;"></a></h3><p><strong></strong>: -1 -&gt; -1 1 -&gt; +1 0 -&gt; &quot;&quot;</p><p><strong></strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li><li>only_neg (<a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#str" target="_blank" rel="noreferrer"><code>str</code></a>: + - &quot;&quot;</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L92" 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:#6F42C1;--shiki-dark:#B392F0;"> sign_format</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, only_neg: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">False</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</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:#032F62;--shiki-dark:#9ECBFF;"> &#39;&#39;</span></span></code></pre></div></details><h3 id="func-sign-format-x-float-only-neg-bool-false-str" tabindex="-1"><em><strong>func</strong></em> <code>sign_format(x: float, only_neg: bool = False) -&gt; str</code> <a class="header-anchor" href="#func-sign-format-x-float-only-neg-bool-false-str" aria-label="Permalink to &quot;***func*** \`sign_format(x: float, only_neg: bool = False) -&gt; str\`&quot;"></a></h3><p><strong></strong>: -1 -&gt; -1 1 -&gt; +1 0 -&gt; &quot;&quot;</p><p><strong></strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li><li>only_neg (<a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#str" target="_blank" rel="noreferrer"><code>str</code></a>: + - &quot;&quot;</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/utils.py#L92" 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:#6F42C1;--shiki-dark:#B392F0;"> sign_format</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, only_neg: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">False</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;格式化符号数</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> -1 -&gt; -1</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 1 -&gt; +1</span></span>
@ -66,4 +66,4 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</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:#D73A49;--shiki-dark:#F97583;"> f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;-</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(x)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;&#39;</span></span></code></pre></div></details>`,38),h=[l];function e(p,k,r,o,d,g){return a(),i("div",null,h)}const E=s(n,[["render",e]]);export{F as __pageData,E as default};
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;&#39;</span></span></code></pre></div></details>`,38),h=[l];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const c=s(n,[["render",p]]);export{F as __pageData,c as default};

View File

@ -1 +1 @@
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/utils.md","filePath":"ja/api/mp_math/utils.md"}'),n={name:"ja/api/mp_math/utils.md"},l=t("",38),h=[l];function e(p,k,r,o,d,g){return a(),i("div",null,h)}const E=s(n,[["render",e]]);export{F as __pageData,E as default};
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const F=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/utils.md","filePath":"ja/api/mp_math/utils.md"}'),n={name:"ja/api/mp_math/utils.md"},l=t("",38),h=[l];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const c=s(n,[["render",p]]);export{F as __pageData,c as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/vector.md","filePath":"ja/api/mp_math/vector.md"}'),n={name:"ja/api/mp_math/vector.md"},e=t(`<h1 id="mbcp-mp-math-vector" tabindex="-1">mbcp.mp_math.vector <a class="header-anchor" href="#mbcp-mp-math-vector" aria-label="Permalink to &quot;mbcp.mp_math.vector&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了3维向量的类Vector3以及一些常用的向量。</p><h3 id="class-vector3" tabindex="-1"><em><strong>class</strong></em> <code>Vector3</code> <a class="header-anchor" href="#class-vector3" aria-label="Permalink to &quot;***class*** \`Vector3\`&quot;"></a></h3><h4 id="def-init-self-x-float-y-float-z-float" tabindex="-1"><em><strong>def</strong></em> <code>__init__(self, x: float, y: float, z: float)</code> <a class="header-anchor" href="#def-init-self-x-float-y-float-z-float" aria-label="Permalink to &quot;***def*** \`__init__(self, x: float, y: float, z: float)\`&quot;"></a></h4><p><strong>説明</strong>: 3维向量</p><p><strong>引数</strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): x轴分量</li><li>y (<code>float</code>): y轴分量</li><li>z (<code>float</code>): z轴分量</li></ul></blockquote><details><summary><b>ソースコード</b> または <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L18" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, z: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/vector.md","filePath":"ja/api/mp_math/vector.md"}'),n={name:"ja/api/mp_math/vector.md"},l=t(`<h1 id="mbcp-mp-math-vector" tabindex="-1">mbcp.mp_math.vector <a class="header-anchor" href="#mbcp-mp-math-vector" aria-label="Permalink to &quot;mbcp.mp_math.vector&quot;"></a></h1><p><strong>説明</strong>: 本模块定义了3维向量的类Vector3以及一些常用的向量。</p><h3 id="class-vector3" tabindex="-1"><em><strong>class</strong></em> <code>Vector3</code> <a class="header-anchor" href="#class-vector3" aria-label="Permalink to &quot;***class*** \`Vector3\`&quot;"></a></h3><h4 id="func-init-self-x-float-y-float-z-float" tabindex="-1"><em><strong>func</strong></em> <code>__init__(self, x: float, y: float, z: float)</code> <a class="header-anchor" href="#func-init-self-x-float-y-float-z-float" aria-label="Permalink to &quot;***func*** \`__init__(self, x: float, y: float, z: float)\`&quot;"></a></h4><p><strong>説明</strong>: 3维向量</p><p><strong>引数</strong>:</p><blockquote><ul><li>x (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): x轴分量</li><li>y (<code>float</code>): y轴分量</li><li>z (<code>float</code>): z轴分量</li></ul></blockquote><details><summary><b>ソースコード</b> または <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L18" 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;"> __init__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, x: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, y: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, z: </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;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 3维向量</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -8,7 +8,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> y</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> z</span></span></code></pre></div></details><h4 id="def-approx-self-other-vector3-epsilon-float-approx-bool" tabindex="-1"><em><strong>def</strong></em> <code>approx(self, other: Vector3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#def-approx-self-other-vector3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***def*** \`approx(self, other: Vector3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.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:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> z</span></span></code></pre></div></details><h4 id="func-approx-self-other-vector3-epsilon-float-approx-bool" tabindex="-1"><em><strong>func</strong></em> <code>approx(self, other: Vector3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#func-approx-self-other-vector3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***func*** \`approx(self, other: Vector3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.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:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -18,7 +18,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否近似相等</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> all</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon])</span></span></code></pre></div></details><h4 id="def-cal-angle-self-other-vector3-anyangle" tabindex="-1"><em><strong>def</strong></em> <code>cal_angle(self, other: Vector3) -&gt; AnyAngle</code> <a class="header-anchor" href="#def-cal-angle-self-other-vector3-anyangle" aria-label="Permalink to &quot;***def*** \`cal_angle(self, other: Vector3) -&gt; AnyAngle\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./angle.html#class-anyangle"><code>AnyAngle</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L42" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_angle</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> all</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon])</span></span></code></pre></div></details><h4 id="func-cal-angle-self-other-vector3-anyangle" tabindex="-1"><em><strong>func</strong></em> <code>cal_angle(self, other: Vector3) -&gt; AnyAngle</code> <a class="header-anchor" href="#func-cal-angle-self-other-vector3-anyangle" aria-label="Permalink to &quot;***func*** \`cal_angle(self, other: Vector3) -&gt; AnyAngle\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./angle.html#class-anyangle"><code>AnyAngle</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L42" 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:#6F42C1;--shiki-dark:#B392F0;"> cal_angle</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;AnyAngle&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -26,7 +26,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`AnyAngle\`](./angle#class-anyangle): 夹角</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> AnyAngle(math.acos(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> @</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other </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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.length </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.length)), </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="def-cross-self-other-vector3-vector3" tabindex="-1"><em><strong>def</strong></em> <code>cross(self, other: Vector3) -&gt; Vector3</code> <a class="header-anchor" href="#def-cross-self-other-vector3-vector3" aria-label="Permalink to &quot;***def*** \`cross(self, other: Vector3) -&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: v1 cross v2 -&gt; v3</p><p>0 </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L52" 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:#6F42C1;--shiki-dark:#B392F0;"> cross</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</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(math.acos(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> @</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other </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;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.length </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.length)), </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="func-cross-self-other-vector3-vector3" tabindex="-1"><em><strong>func</strong></em> <code>cross(self, other: Vector3) -&gt; Vector3</code> <a class="header-anchor" href="#func-cross-self-other-vector3-vector3" aria-label="Permalink to &quot;***func*** \`cross(self, other: Vector3) -&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: v1 cross v2 -&gt; v3</p><p>0 </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L52" 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:#6F42C1;--shiki-dark:#B392F0;"> cross</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 向量积 叉乘v1 cross v2 -&gt; v3</span></span>
<span class="line"></span>
@ -46,7 +46,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`Vector3\`](#class-vector3): 叉乘结果</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z </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;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x </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;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y </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;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x)</span></span></code></pre></div></details><h4 id="def-is-approx-parallel-self-other-vector3-epsilon-float-approx-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#def-is-approx-parallel-self-other-vector3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***def*** \`is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L76" 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:#6F42C1;--shiki-dark:#B392F0;"> is_approx_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z </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;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x </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;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y </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;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x)</span></span></code></pre></div></details><h4 id="func-is-approx-parallel-self-other-vector3-epsilon-float-approx-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#func-is-approx-parallel-self-other-vector3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***func*** \`is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li><li>epsilon (<a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L76" 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:#6F42C1;--shiki-dark:#B392F0;"> is_approx_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -55,7 +55,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否近似平行</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.cross(other).length </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon</span></span></code></pre></div></details><h4 id="def-is-parallel-self-other-vector3-bool" tabindex="-1"><em><strong>def</strong></em> <code>is_parallel(self, other: Vector3) -&gt; bool</code> <a class="header-anchor" href="#def-is-parallel-self-other-vector3-bool" aria-label="Permalink to &quot;***def*** \`is_parallel(self, other: Vector3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L87" 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:#6F42C1;--shiki-dark:#B392F0;"> is_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.cross(other).length </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon</span></span></code></pre></div></details><h4 id="func-is-parallel-self-other-vector3-bool" tabindex="-1"><em><strong>func</strong></em> <code>is_parallel(self, other: Vector3) -&gt; bool</code> <a class="header-anchor" href="#func-is-parallel-self-other-vector3-bool" aria-label="Permalink to &quot;***func*** \`is_parallel(self, other: Vector3) -&gt; bool\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L87" 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:#6F42C1;--shiki-dark:#B392F0;"> is_parallel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -63,7 +63,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否平行</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.cross(other).approx(zero_vector3)</span></span></code></pre></div></details><h4 id="def-normalize-self" tabindex="-1"><em><strong>def</strong></em> <code>normalize(self)</code> <a class="header-anchor" href="#def-normalize-self" aria-label="Permalink to &quot;***def*** \`normalize(self)\`&quot;"></a></h4><p><strong></strong>: </p><p></p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L97" 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:#6F42C1;--shiki-dark:#B392F0;"> normalize</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.cross(other).approx(zero_vector3)</span></span></code></pre></div></details><h4 id="func-normalize-self" tabindex="-1"><em><strong>func</strong></em> <code>normalize(self)</code> <a class="header-anchor" href="#func-normalize-self" aria-label="Permalink to &quot;***func*** \`normalize(self)\`&quot;"></a></h4><p><strong></strong>: </p><p></p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L97" 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:#6F42C1;--shiki-dark:#B392F0;"> normalize</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 将向量归一化</span></span>
<span class="line"></span>
@ -72,33 +72,33 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> length </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;">.length</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> length</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> length</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> length</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="def-np-array-self-np-ndarray" tabindex="-1"><em><strong>def</strong></em> <code>np_array(self) -&gt; np.ndarray</code> <a class="header-anchor" href="#def-np-array-self-np-ndarray" aria-label="Permalink to &quot;***def*** \`np_array(self) -&gt; np.ndarray\`&quot;"></a></h4><p><strong></strong>: <a href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html" target="_blank" rel="noreferrer"><code>np.ndarray</code></a>: numpy</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L109" 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> length</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="func-np-array-self-np-ndarray" tabindex="-1"><em><strong>func</strong></em> <code>np_array(self) -&gt; np.ndarray</code> <a class="header-anchor" href="#func-np-array-self-np-ndarray" aria-label="Permalink to &quot;***func*** \`np_array(self) -&gt; np.ndarray\`&quot;"></a></h4><p><strong></strong>: <a href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html" target="_blank" rel="noreferrer"><code>np.ndarray</code></a>: numpy</p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L109" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> np_array</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;np.ndarray&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 返回numpy数组</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;"> [\`np.ndarray\`](https%3A//numpy.org/doc/stable/reference/generated/numpy.ndarray.html): numpy数组</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> np.array([</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z])</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="def-length-self-float" tabindex="-1"><em><strong>def</strong></em> <code>length(self) -&gt; float</code> <a class="header-anchor" href="#def-length-self-float" aria-label="Permalink to &quot;***def*** \`length(self) -&gt; float\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L119" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> np.array([</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z])</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="func-length-self-float" tabindex="-1"><em><strong>func</strong></em> <code>length(self) -&gt; float</code> <a class="header-anchor" href="#func-length-self-float" aria-label="Permalink to &quot;***func*** \`length(self) -&gt; float\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L119" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> length</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; </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;"> &quot;&quot;&quot;</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;"> [\`float\`](https%3A//docs.python.org/3/library/functions.html#float): 模</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> math.sqrt(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </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;">.y </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;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">**</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</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="def-unit-self-vector3" tabindex="-1"><em><strong>def</strong></em> <code>unit(self) -&gt; Vector3</code> <a class="header-anchor" href="#def-unit-self-vector3" aria-label="Permalink to &quot;***def*** \`unit(self) -&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>: <a href="#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.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:#6F42C1;--shiki-dark:#B392F0;">@</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">property</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> math.sqrt(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </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;">.y </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;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">**</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</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="func-unit-self-vector3" tabindex="-1"><em><strong>func</strong></em> <code>unit(self) -&gt; Vector3</code> <a class="header-anchor" href="#func-unit-self-vector3" aria-label="Permalink to &quot;***func*** \`unit(self) -&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>: <a href="#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.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:#6F42C1;--shiki-dark:#B392F0;">@</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">property</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> unit</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> [\`Vector3\`](#class-vector3): 单位向量</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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:#D73A49;--shiki-dark:#F97583;"> /</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.length</span></span></code></pre></div></details><h4 id="def-abs-self" tabindex="-1"><em><strong>def</strong></em> <code>__abs__(self)</code> <a class="header-anchor" href="#def-abs-self" aria-label="Permalink to &quot;***def*** \`__abs__(self)\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L136" 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;"> __abs__</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.length</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-vector3-vector3" tabindex="-1"><em><strong>def</strong></em> <code>self + other: Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-vector3-vector3" aria-label="Permalink to &quot;***def*** \`self + other: Vector3 =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L140" 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>
<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:#D73A49;--shiki-dark:#F97583;"> /</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.length</span></span></code></pre></div></details><h4 id="func-abs-self" tabindex="-1"><em><strong>func</strong></em> <code>__abs__(self)</code> <a class="header-anchor" href="#func-abs-self" aria-label="Permalink to &quot;***func*** \`__abs__(self)\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L136" 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;"> __abs__</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.length</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-vector3-vector3" tabindex="-1"><em><strong>func</strong></em> <code>self + other: Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-vector3-vector3" aria-label="Permalink to &quot;***func*** \`self + other: Vector3 =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L140" 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>
<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;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-point3-point3" tabindex="-1"><em><strong>def</strong></em> <code>self + other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#def-self-other-point3-point3" aria-label="Permalink to &quot;***def*** \`self + other: Point3 =&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L144" 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-point3-point3" tabindex="-1"><em><strong>func</strong></em> <code>self + other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#func-self-other-point3-point3" aria-label="Permalink to &quot;***func*** \`self + other: Point3 =&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L144" 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>
<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;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="def-self-other" tabindex="-1"><em><strong>def</strong></em> <code>self + other</code> <a class="header-anchor" href="#def-self-other" aria-label="Permalink to &quot;***def*** \`self + other\`&quot;"></a></h4><p><strong></strong>: V + P -&gt; P</p><p>V + V -&gt; V</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.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:#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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="func-self-other" tabindex="-1"><em><strong>func</strong></em> <code>self + other</code> <a class="header-anchor" href="#func-self-other" aria-label="Permalink to &quot;***func*** \`self + other\`&quot;"></a></h4><p><strong></strong>: V + P -&gt; P</p><p>V + V -&gt; V</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.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:#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>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> V + P -&gt; P</span></span>
<span class="line"></span>
@ -113,7 +113,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other, Point3):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for +: &#39;Vector3&#39; and &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-eq-self-other" tabindex="-1"><em><strong>def</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#def-eq-self-other" aria-label="Permalink to &quot;***def*** \`__eq__(self, other)\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L163" 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;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for +: &#39;Vector3&#39; and &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-eq-self-other" tabindex="-1"><em><strong>func</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#func-eq-self-other" aria-label="Permalink to &quot;***func*** \`__eq__(self, other)\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#bool" target="_blank" rel="noreferrer"><code>bool</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L163" 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:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -121,7 +121,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否相等</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.x, other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.y, other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.z, other.z)</span></span></code></pre></div></details><h4 id="def-self-other-point3-point3-1" tabindex="-1"><em><strong>def</strong></em> <code>self + other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#def-self-other-point3-point3-1" aria-label="Permalink to &quot;***def*** \`self + other: Point3 =&gt; Point3\`&quot;"></a></h4><p><strong></strong>: P + V -&gt; P</p><p></p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L173" 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;"> __radd__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</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;"> approx(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x, other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.y, other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</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;">.z, other.z)</span></span></code></pre></div></details><h4 id="func-self-other-point3-point3-1" tabindex="-1"><em><strong>func</strong></em> <code>self + other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#func-self-other-point3-point3-1" aria-label="Permalink to &quot;***func*** \`self + other: Point3 =&gt; Point3\`&quot;"></a></h4><p><strong></strong>: P + V -&gt; P</p><p></p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L173" 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;"> __radd__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> P + V -&gt; P</span></span>
<span class="line"></span>
@ -131,11 +131,11 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`Point3\`](./point#class-point3): 新的点</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-vector3-vector3-1" tabindex="-1"><em><strong>def</strong></em> <code>self - other: Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-vector3-vector3-1" aria-label="Permalink to &quot;***def*** \`self - other: Vector3 =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L185" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-vector3-vector3-1" tabindex="-1"><em><strong>func</strong></em> <code>self - other: Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-vector3-vector3-1" aria-label="Permalink to &quot;***func*** \`self - other: Vector3 =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L185" 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>
<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;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-point3-point3-2" tabindex="-1"><em><strong>def</strong></em> <code>self - other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#def-self-other-point3-point3-2" aria-label="Permalink to &quot;***def*** \`self - other: Point3 =&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L189" 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-point3-point3-2" tabindex="-1"><em><strong>func</strong></em> <code>self - other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#func-self-other-point3-point3-2" aria-label="Permalink to &quot;***func*** \`self - other: Point3 =&gt; Point3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L189" 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>
<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;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="def-self-other-1" tabindex="-1"><em><strong>def</strong></em> <code>self - other</code> <a class="header-anchor" href="#def-self-other-1" aria-label="Permalink to &quot;***def*** \`self - other\`&quot;"></a></h4><p><strong></strong>: V - P -&gt; P</p><p>V - V -&gt; V</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L192" 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="func-self-other-1" tabindex="-1"><em><strong>func</strong></em> <code>self - other</code> <a class="header-anchor" href="#func-self-other-1" aria-label="Permalink to &quot;***func*** \`self - other\`&quot;"></a></h4><p><strong></strong>: V - P -&gt; P</p><p>V - V -&gt; V</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="#class-vector3"><code>Vector3</code></a> | <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L192" 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>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> V - P -&gt; P</span></span>
<span class="line"></span>
@ -150,7 +150,7 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other, Point3):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;unsupported operand type(s) for -: &quot;Vector3&quot; and &quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-self-other-point3" tabindex="-1"><em><strong>def</strong></em> <code>self - other: Point3</code> <a class="header-anchor" href="#def-self-other-point3" aria-label="Permalink to &quot;***def*** \`self - other: Point3\`&quot;"></a></h4><p><strong></strong>: P - V -&gt; P</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L208" 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;"> __rsub__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;unsupported operand type(s) for -: &quot;Vector3&quot; and &quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-self-other-point3" tabindex="-1"><em><strong>func</strong></em> <code>self - other: Point3</code> <a class="header-anchor" href="#func-self-other-point3" aria-label="Permalink to &quot;***func*** \`self - other: Point3\`&quot;"></a></h4><p><strong></strong>: P - V -&gt; P</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="./point.html#class-point3"><code>Point3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="./point.html#class-point3"><code>Point3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L208" 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;"> __rsub__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> P - V -&gt; P</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -161,11 +161,11 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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, Point3):</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(other.x </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;">.x, other.y </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;">.y, other.z </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;">.z)</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for -: &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39; and &#39;Vector3&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-vector3-vector3-2" tabindex="-1"><em><strong>def</strong></em> <code>self * other: Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-vector3-vector3-2" aria-label="Permalink to &quot;***def*** \`self * other: Vector3 =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L223" 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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for -: &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39; and &#39;Vector3&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-vector3-vector3-2" tabindex="-1"><em><strong>func</strong></em> <code>self * other: Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-vector3-vector3-2" aria-label="Permalink to &quot;***func*** \`self * other: Vector3 =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L223" 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>
<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:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="def-self-other-realnumber-vector3" tabindex="-1"><em><strong>def</strong></em> <code>self * other: RealNumber =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-realnumber-vector3" aria-label="Permalink to &quot;***def*** \`self * other: RealNumber =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L227" 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>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><p><code>@overload</code></p><h4 id="func-self-other-realnumber-vector3" tabindex="-1"><em><strong>func</strong></em> <code>self * other: RealNumber =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-realnumber-vector3" aria-label="Permalink to &quot;***func*** \`self * other: RealNumber =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L227" 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>
<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: RealNumber) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="def-self-other-int-float-vector3-vector3" tabindex="-1"><em><strong>def</strong></em> <code>self * other: int | float | Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-int-float-vector3-vector3" aria-label="Permalink to &quot;***def*** \`self * other: int | float | Vector3 =&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: 使@使cross</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a> | <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="#class-vector"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L230" 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:#032F62;--shiki-dark:#9ECBFF;">&#39;int | float | Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h4 id="func-self-other-int-float-vector3-vector3" tabindex="-1"><em><strong>func</strong></em> <code>self * other: int | float | Vector3 =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-int-float-vector3-vector3" aria-label="Permalink to &quot;***func*** \`self * other: int | float | Vector3 =&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: 使@使cross</p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a> | <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="#class-vector"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L230" 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:#032F62;--shiki-dark:#9ECBFF;">&#39;int | float | Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 数组运算 非点乘点乘使用@叉乘使用cross</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
@ -178,8 +178,8 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> elif</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> isinstance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(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:#005CC5;--shiki-dark:#79B8FF;">int</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;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other)</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>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for *: &#39;Vector3&#39; and &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="def-self-other-realnumber-vector3-1" tabindex="-1"><em><strong>def</strong></em> <code>self * other: RealNumber =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-realnumber-vector3-1" aria-label="Permalink to &quot;***def*** \`self * other: RealNumber =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L246" 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;"> __rmul__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;RealNumber&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">__mul__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span></span></code></pre></div></details><h4 id="def-self-other-vector3-realnumber" tabindex="-1"><em><strong>def</strong></em> <code>self @ other: Vector3 =&gt; RealNumber</code> <a class="header-anchor" href="#def-self-other-vector3-realnumber" aria-label="Permalink to &quot;***def*** \`self @ other: Vector3 =&gt; RealNumber\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L249" 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;"> __matmul__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;RealNumber&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> raise</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> TypeError</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;unsupported operand type(s) for *: &#39;Vector3&#39; and &#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details><h4 id="func-self-other-realnumber-vector3-1" tabindex="-1"><em><strong>func</strong></em> <code>self * other: RealNumber =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-realnumber-vector3-1" aria-label="Permalink to &quot;***func*** \`self * other: RealNumber =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L246" 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;"> __rmul__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;RealNumber&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">__mul__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(other)</span></span></code></pre></div></details><h4 id="func-self-other-vector3-realnumber" tabindex="-1"><em><strong>func</strong></em> <code>self @ other: Vector3 =&gt; RealNumber</code> <a class="header-anchor" href="#func-self-other-vector3-realnumber" aria-label="Permalink to &quot;***func*** \`self @ other: Vector3 =&gt; RealNumber\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>:</p><blockquote><ul><li>other (<a href="#class-vector3"><code>Vector3</code></a>): </li></ul></blockquote><p><strong></strong>: <a href="https://docs.python.org/3/library/functions.html#float" target="_blank" rel="noreferrer"><code>float</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L249" 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;"> __matmul__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;RealNumber&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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>
@ -187,11 +187,11 @@ import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E
<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;"> [\`float\`](https%3A//docs.python.org/3/library/functions.html#float): 点乘结果</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x </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;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y </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;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z</span></span></code></pre></div></details><h4 id="def-self-other-realnumber-vector3-2" tabindex="-1"><em><strong>def</strong></em> <code>self / other: RealNumber =&gt; Vector3</code> <a class="header-anchor" href="#def-self-other-realnumber-vector3-2" aria-label="Permalink to &quot;***def*** \`self / other: RealNumber =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L259" 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: RealNumber) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</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;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other)</span></span></code></pre></div></details><h4 id="def-self-vector3" tabindex="-1"><em><strong>def</strong></em> <code>- self =&gt; Vector3</code> <a class="header-anchor" href="#def-self-vector3" aria-label="Permalink to &quot;***def*** \`- self =&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>: <a href="#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L262" 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;"> __neg__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</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:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x </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;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y </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;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z</span></span></code></pre></div></details><h4 id="func-self-other-realnumber-vector3-2" tabindex="-1"><em><strong>func</strong></em> <code>self / other: RealNumber =&gt; Vector3</code> <a class="header-anchor" href="#func-self-other-realnumber-vector3-2" aria-label="Permalink to &quot;***func*** \`self / other: RealNumber =&gt; Vector3\`&quot;"></a></h4><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L259" 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: RealNumber) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</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;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other)</span></span></code></pre></div></details><h4 id="func-self-vector3" tabindex="-1"><em><strong>func</strong></em> <code>- self =&gt; Vector3</code> <a class="header-anchor" href="#func-self-vector3" aria-label="Permalink to &quot;***func*** \`- self =&gt; Vector3\`&quot;"></a></h4><p><strong></strong>: </p><p><strong></strong>: <a href="#class-vector3"><code>Vector3</code></a>: </p><details><summary><b></b> <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L262" 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;"> __neg__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</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;"> [\`Vector3\`](#class-vector3): 负向量</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</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;">.x, </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;">.y, </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;">.z)</span></span></code></pre></div></details><h3 id="var-zero-vector3" tabindex="-1">var <code>zero_vector3</code> <a class="header-anchor" href="#var-zero-vector3" aria-label="Permalink to &quot;var \`zero_vector3\`&quot;"></a></h3><ul><li><p><strong></strong>: </p></li><li><p><strong></strong>: <code>Vector3</code></p></li><li><p><strong></strong>: <code>Vector3(0, 0, 0)</code></p></li></ul><h3 id="var-x-axis" tabindex="-1">var <code>x_axis</code> <a class="header-anchor" href="#var-x-axis" aria-label="Permalink to &quot;var \`x_axis\`&quot;"></a></h3><ul><li><p><strong></strong>: x</p></li><li><p><strong></strong>: <code>Vector3</code></p></li><li><p><strong></strong>: <code>Vector3(1, 0, 0)</code></p></li></ul><h3 id="var-y-axis" tabindex="-1">var <code>y_axis</code> <a class="header-anchor" href="#var-y-axis" aria-label="Permalink to &quot;var \`y_axis\`&quot;"></a></h3><ul><li><p><strong></strong>: y</p></li><li><p><strong></strong>: <code>Vector3</code></p></li><li><p><strong></strong>: <code>Vector3(0, 1, 0)</code></p></li></ul><h3 id="var-z-axis" tabindex="-1">var <code>z_axis</code> <a class="header-anchor" href="#var-z-axis" aria-label="Permalink to &quot;var \`z_axis\`&quot;"></a></h3><ul><li><p><strong></strong>: z</p></li><li><p><strong></strong>: <code>Vector3</code></p></li><li><p><strong></strong>: <code>Vector3(0, 0, 1)</code></p></li></ul>`,138),l=[e];function h(p,k,r,o,d,g){return a(),i("div",null,l)}const y=s(n,[["render",h]]);export{E as __pageData,y as default};
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</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;">.x, </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;">.y, </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;">.z)</span></span></code></pre></div></details><h3 id="var-zero-vector3" tabindex="-1">var <code>zero_vector3</code> <a class="header-anchor" href="#var-zero-vector3" aria-label="Permalink to &quot;var \`zero_vector3\`&quot;"></a></h3><ul><li><p><strong></strong>: </p></li><li><p><strong></strong>: <code>Vector3</code></p></li><li><p><strong></strong>: <code>Vector3(0, 0, 0)</code></p></li></ul><h3 id="var-x-axis" tabindex="-1">var <code>x_axis</code> <a class="header-anchor" href="#var-x-axis" aria-label="Permalink to &quot;var \`x_axis\`&quot;"></a></h3><ul><li><p><strong></strong>: x</p></li><li><p><strong></strong>: <code>Vector3</code></p></li><li><p><strong></strong>: <code>Vector3(1, 0, 0)</code></p></li></ul><h3 id="var-y-axis" tabindex="-1">var <code>y_axis</code> <a class="header-anchor" href="#var-y-axis" aria-label="Permalink to &quot;var \`y_axis\`&quot;"></a></h3><ul><li><p><strong></strong>: y</p></li><li><p><strong></strong>: <code>Vector3</code></p></li><li><p><strong></strong>: <code>Vector3(0, 1, 0)</code></p></li></ul><h3 id="var-z-axis" tabindex="-1">var <code>z_axis</code> <a class="header-anchor" href="#var-z-axis" aria-label="Permalink to &quot;var \`z_axis\`&quot;"></a></h3><ul><li><p><strong></strong>: z</p></li><li><p><strong></strong>: <code>Vector3</code></p></li><li><p><strong></strong>: <code>Vector3(0, 0, 1)</code></p></li></ul>`,138),e=[l];function h(p,k,r,o,d,c){return a(),i("div",null,e)}const y=s(n,[["render",h]]);export{E as __pageData,y as default};

View File

@ -1 +1 @@
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/vector.md","filePath":"ja/api/mp_math/vector.md"}'),n={name:"ja/api/mp_math/vector.md"},e=t("",138),l=[e];function h(p,k,r,o,d,g){return a(),i("div",null,l)}const y=s(n,[["render",h]]);export{E as __pageData,y as default};
import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.DpC1ZpOZ.js";const E=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector","lastUpdated":false},"headers":[],"relativePath":"ja/api/mp_math/vector.md","filePath":"ja/api/mp_math/vector.md"}'),n={name:"ja/api/mp_math/vector.md"},l=t("",138),e=[l];function h(p,k,r,o,d,c){return a(),i("div",null,e)}const y=s(n,[["render",h]]);export{E as __pageData,y as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"ja/api/presets/model/index.md","filePath":"ja/api/presets/model/index.md"}'),t={name:"ja/api/presets/model/index.md"},h=n(`<h1 id="mbcp-presets-model" tabindex="-1">mbcp.presets.model <a class="header-anchor" href="#mbcp-presets-model" aria-label="Permalink to &quot;mbcp.presets.model&quot;"></a></h1><p><strong>説明</strong>: 几何模型点集</p><h3 id="class-geometricmodels" tabindex="-1"><em><strong>class</strong></em> <code>GeometricModels</code> <a class="header-anchor" href="#class-geometricmodels" aria-label="Permalink to &quot;***class*** \`GeometricModels\`&quot;"></a></h3><p><a href="https://docs.python.org/3/library/functions.html#staticmethod" target="_blank" rel="noreferrer"><code>@staticmethod</code></a></p><h4 id="def-sphere-radius-float-density-float" tabindex="-1"><em><strong>def</strong></em> <code>sphere(radius: float, density: float)</code> <a class="header-anchor" href="#def-sphere-radius-float-density-float" aria-label="Permalink to &quot;***def*** \`sphere(radius: float, density: float)\`&quot;"></a></h4><p><strong>説明</strong>: 生成球体上的点集。</p><p><strong>引数</strong>:</p><blockquote><ul><li>radius:</li><li>density:</li></ul></blockquote><p><strong>戻り値</strong>: List[Point3]: 球体上的点集。</p><details><summary><b>ソースコード</b> または <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/presets/model/__init__.py#L12" 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;">staticmethod</span></span>
import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.DpC1ZpOZ.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"ja/api/presets/model/index.md","filePath":"ja/api/presets/model/index.md"}'),t={name:"ja/api/presets/model/index.md"},h=n(`<h1 id="mbcp-presets-model" tabindex="-1">mbcp.presets.model <a class="header-anchor" href="#mbcp-presets-model" aria-label="Permalink to &quot;mbcp.presets.model&quot;"></a></h1><p><strong>説明</strong>: 几何模型点集</p><h3 id="class-geometricmodels" tabindex="-1"><em><strong>class</strong></em> <code>GeometricModels</code> <a class="header-anchor" href="#class-geometricmodels" aria-label="Permalink to &quot;***class*** \`GeometricModels\`&quot;"></a></h3><p><a href="https://docs.python.org/3/library/functions.html#staticmethod" target="_blank" rel="noreferrer"><code>@staticmethod</code></a></p><h4 id="func-sphere-radius-float-density-float" tabindex="-1"><em><strong>func</strong></em> <code>sphere(radius: float, density: float)</code> <a class="header-anchor" href="#func-sphere-radius-float-density-float" aria-label="Permalink to &quot;***func*** \`sphere(radius: float, density: float)\`&quot;"></a></h4><p><strong>説明</strong>: 生成球体上的点集。</p><p><strong>引数</strong>:</p><blockquote><ul><li>radius:</li><li>density:</li></ul></blockquote><p><strong>戻り値</strong>: List[Point3]: 球体上的点集。</p><details><summary><b>ソースコード</b> または <a href="https://github.com/snowykami/mbcp/tree/main/mbcp/presets/model/__init__.py#L12" 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;">staticmethod</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> sphere</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(radius: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, density: </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;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 生成球体上的点集</span></span>

Some files were not shown because too many files have changed in this diff Show More