mirror of
https://github.com/snowykami/mbcp.git
synced 2024-11-26 08:15:03 +08:00
Deploying to docs from @ snowykami/mbcp@60763de407 🚀
This commit is contained in:
parent
8e6aa42155
commit
623ab2a08d
10
api/api.html
10
api/api.html
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
@ -1 +0,0 @@
|
|||||||
import{_ as e,c as a,o as t,a4 as p}from"./chunks/framework.DpC1ZpOZ.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"api/api.md","filePath":"zh/api/api.md"}'),c={name:"api/api.md"},o=p('<h1 id="mbcp" tabindex="-1">mbcp <a class="header-anchor" href="#mbcp" aria-label="Permalink to "mbcp""></a></h1><p><strong>说明</strong>: 本模块是主模块,提供了一些工具 可导入</p><p><code>mbcp.mp_math</code>:数学工具</p><p><code>mbcp.particle</code>:粒子生成工具</p><p><code>mbcp.presets</code>:预设</p>',5),s=[o];function r(_,i,d,n,m,l){return t(),a("div",null,s)}const f=e(c,[["render",r]]);export{b as __pageData,f as default};
|
|
@ -1 +0,0 @@
|
|||||||
import{_ as e,c as a,o as t,a4 as p}from"./chunks/framework.DpC1ZpOZ.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"api/api.md","filePath":"zh/api/api.md"}'),c={name:"api/api.md"},o=p("",5),s=[o];function r(_,i,d,n,m,l){return t(),a("div",null,s)}const f=e(c,[["render",r]]);export{b as __pageData,f as default};
|
|
1
assets/api_api.md.rnPOv6-O.js
Normal file
1
assets/api_api.md.rnPOv6-O.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as e,c as a,o as t,a4 as p}from"./chunks/framework.DpC1ZpOZ.js";const f=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"api/api.md","filePath":"zh/api/api.md"}'),c={name:"api/api.md"},o=p('<h1 id="mbcp" tabindex="-1">mbcp <a class="header-anchor" href="#mbcp" aria-label="Permalink to "mbcp""></a></h1><p><strong>说明</strong>: 本模块是主模块,提供了一些工具 可导入</p><p><a href="./mp_math/"><code>mbcp.mp_math</code></a>:数学工具</p><p><a href="./particle/"><code>mbcp.particle</code></a>:粒子生成工具</p><p><a href="./presets/"><code>mbcp.presets</code></a>:预设</p>',5),r=[o];function s(_,i,d,m,n,l){return t(),a("div",null,r)}const b=e(c,[["render",s]]);export{f as __pageData,b as default};
|
1
assets/api_api.md.rnPOv6-O.lean.js
Normal file
1
assets/api_api.md.rnPOv6-O.lean.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as e,c as a,o as t,a4 as p}from"./chunks/framework.DpC1ZpOZ.js";const f=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"api/api.md","filePath":"zh/api/api.md"}'),c={name:"api/api.md"},o=p("",5),r=[o];function s(_,i,d,m,n,l){return t(),a("div",null,r)}const b=e(c,[["render",s]]);export{f as __pageData,b as default};
|
@ -1 +0,0 @@
|
|||||||
import{_ as e,c as t,o as a,a4 as c}from"./chunks/framework.DpC1ZpOZ.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"api/index.md","filePath":"zh/api/index.md"}'),p={name:"api/index.md"},o=c('<h1 id="mbcp" tabindex="-1">mbcp <a class="header-anchor" href="#mbcp" aria-label="Permalink to "mbcp""></a></h1><p><strong>说明</strong>: 本模块是主模块,提供了一些工具 可导入</p><p><code>mbcp.mp_math</code>:数学工具</p><p><code>mbcp.particle</code>:粒子生成工具</p><p><code>mbcp.presets</code>:预设</p>',5),s=[o];function d(r,_,n,i,m,l){return a(),t("div",null,s)}const f=e(p,[["render",d]]);export{b as __pageData,f as default};
|
|
@ -1 +0,0 @@
|
|||||||
import{_ as e,c as t,o as a,a4 as c}from"./chunks/framework.DpC1ZpOZ.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"api/index.md","filePath":"zh/api/index.md"}'),p={name:"api/index.md"},o=c("",5),s=[o];function d(r,_,n,i,m,l){return a(),t("div",null,s)}const f=e(p,[["render",d]]);export{b as __pageData,f as default};
|
|
1
assets/api_index.md.qnrSd__i.js
Normal file
1
assets/api_index.md.qnrSd__i.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as e,c as a,o as t,a4 as c}from"./chunks/framework.DpC1ZpOZ.js";const f=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"api/index.md","filePath":"zh/api/index.md"}'),p={name:"api/index.md"},o=c('<h1 id="mbcp" tabindex="-1">mbcp <a class="header-anchor" href="#mbcp" aria-label="Permalink to "mbcp""></a></h1><p><strong>说明</strong>: 本模块是主模块,提供了一些工具 可导入</p><p><a href="./mp_math/"><code>mbcp.mp_math</code></a>:数学工具</p><p><a href="./particle/"><code>mbcp.particle</code></a>:粒子生成工具</p><p><a href="./presets/"><code>mbcp.presets</code></a>:预设</p>',5),r=[o];function s(d,_,i,n,m,l){return t(),a("div",null,r)}const b=e(p,[["render",s]]);export{f as __pageData,b as default};
|
1
assets/api_index.md.qnrSd__i.lean.js
Normal file
1
assets/api_index.md.qnrSd__i.lean.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as e,c as a,o as t,a4 as c}from"./chunks/framework.DpC1ZpOZ.js";const f=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"api/index.md","filePath":"zh/api/index.md"}'),p={name:"api/index.md"},o=c("",5),r=[o];function s(d,_,i,n,m,l){return t(),a("div",null,r)}const b=e(p,[["render",s]]);export{f as __pageData,b as default};
|
@ -1,22 +1,22 @@
|
|||||||
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 "mbcp.mp_math.vector""></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 "***class*** \`Vector3\`""></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 "***def*** \`__init__(self, x: float, y: float, z: float)\`""></a></h4><p><strong>说明</strong>: 3维向量</p><p><strong>参数</strong>:</p><blockquote><ul><li>x: x轴分量</li><li>y: y轴分量</li><li>z: 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"},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 "mbcp.mp_math.vector""></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 "***class*** \`Vector3\`""></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 "***def*** \`__init__(self, x: float, y: float, z: float)\`""></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;"> """</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;"> 3维向量</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>
|
<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: x轴分量</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> x ([\`float\`](https%3A//docs.python.org/3/library/functions.html#float)): x轴分量</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> y: y轴分量</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> y (\`float\`): y轴分量</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> z: z轴分量</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> z (\`float\`): z轴分量</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#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;">.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;">.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) -> bool</code> <a class="header-anchor" href="#def-approx-self-other-vector3-epsilon-float-approx-bool" aria-label="Permalink to "***def*** \`approx(self, other: Vector3, epsilon: float = APPROX) -> bool\`""></a></h4><p><strong>说明</strong>: 判断两个向量是否近似相等。</p><p><strong>参数</strong>:</p><blockquote><ul><li>other:</li><li>epsilon:</li></ul></blockquote><p><strong>返回</strong>: 是否近似相等</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;">'Vector3'</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;">) -> </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="def-approx-self-other-vector3-epsilon-float-approx-bool" tabindex="-1"><em><strong>def</strong></em> <code>approx(self, other: Vector3, epsilon: float = APPROX) -> bool</code> <a class="header-anchor" href="#def-approx-self-other-vector3-epsilon-float-approx-bool" aria-label="Permalink to "***def*** \`approx(self, other: Vector3, epsilon: float = APPROX) -> bool\`""></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;">'Vector3'</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;">) -> </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;"> """</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 判断两个向量是否近似相等。</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 判断两个向量是否近似相等。</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;"> Args:</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> other:</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> other ([\`Vector3\`](#class-vector3)): 另一个向量</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> epsilon:</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> epsilon ([\`float\`](https%3A//docs.python.org/3/library/functions.html#float)): 误差</span></span>
|
||||||
<span class="line"></span>
|
<span class="line"></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;"> 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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否近似相等</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#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;"><</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;"><</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;"><</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) -> AnyAngle</code> <a class="header-anchor" href="#def-cal-angle-self-other-vector3-anyangle" aria-label="Permalink to "***def*** \`cal_angle(self, other: Vector3) -> AnyAngle\`""></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;">'Vector3'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'AnyAngle'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#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;"><</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;"><</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;"><</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) -> AnyAngle</code> <a class="header-anchor" href="#def-cal-angle-self-other-vector3-anyangle" aria-label="Permalink to "***def*** \`cal_angle(self, other: Vector3) -> AnyAngle\`""></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;">'Vector3'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'AnyAngle'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
@ -1 +1 @@
|
|||||||
import{t as p}from"./chunks/theme.CIlXJY6j.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.rqbpMjWI.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
1
assets/chunks/@localSearchIndexen.CzNg5TZu.js
Normal file
1
assets/chunks/@localSearchIndexen.CzNg5TZu.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/chunks/@localSearchIndexja.CH-7cmaD.js
Normal file
1
assets/chunks/@localSearchIndexja.CH-7cmaD.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
assets/chunks/@localSearchIndexroot.BIMNPnzE.js
Normal file
1
assets/chunks/@localSearchIndexroot.BIMNPnzE.js
Normal file
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
1
assets/chunks/@localSearchIndexzht.DtIiriQ9.js
Normal file
1
assets/chunks/@localSearchIndexzht.DtIiriQ9.js
Normal file
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
@ -1 +0,0 @@
|
|||||||
import{_ as e,c as a,o as t,a4 as p}from"./chunks/framework.DpC1ZpOZ.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"en/api/api.md","filePath":"en/api/api.md"}'),c={name:"en/api/api.md"},o=p("",5),s=[o];function r(i,_,n,d,m,l){return t(),a("div",null,s)}const f=e(c,[["render",r]]);export{b as __pageData,f as default};
|
|
@ -1 +1 @@
|
|||||||
import{_ as e,c as a,o as t,a4 as p}from"./chunks/framework.DpC1ZpOZ.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"en/api/api.md","filePath":"en/api/api.md"}'),c={name:"en/api/api.md"},o=p('<h1 id="mbcp" tabindex="-1">mbcp <a class="header-anchor" href="#mbcp" aria-label="Permalink to "mbcp""></a></h1><p><strong>Description</strong>: 本模块是主模块,提供了一些工具 可导入</p><p><code>mbcp.mp_math</code>:数学工具</p><p><code>mbcp.particle</code>:粒子生成工具</p><p><code>mbcp.presets</code>:预设</p>',5),s=[o];function r(i,_,n,d,m,l){return t(),a("div",null,s)}const f=e(c,[["render",r]]);export{b as __pageData,f as default};
|
import{_ as e,c as a,o as t,a4 as p}from"./chunks/framework.DpC1ZpOZ.js";const f=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"en/api/api.md","filePath":"en/api/api.md"}'),c={name:"en/api/api.md"},o=p('<h1 id="mbcp" tabindex="-1">mbcp <a class="header-anchor" href="#mbcp" aria-label="Permalink to "mbcp""></a></h1><p><strong>Description</strong>: 本模块是主模块,提供了一些工具 可导入</p><p><a href="./mp_math/"><code>mbcp.mp_math</code></a>:数学工具</p><p><a href="./particle/"><code>mbcp.particle</code></a>:粒子生成工具</p><p><a href="./presets/"><code>mbcp.presets</code></a>:预设</p>',5),r=[o];function s(i,_,n,d,m,l){return t(),a("div",null,r)}const b=e(c,[["render",s]]);export{f as __pageData,b as default};
|
1
assets/en_api_api.md.D31N0-_j.lean.js
Normal file
1
assets/en_api_api.md.D31N0-_j.lean.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as e,c as a,o as t,a4 as p}from"./chunks/framework.DpC1ZpOZ.js";const f=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"en/api/api.md","filePath":"en/api/api.md"}'),c={name:"en/api/api.md"},o=p("",5),r=[o];function s(i,_,n,d,m,l){return t(),a("div",null,r)}const b=e(c,[["render",s]]);export{f as __pageData,b as default};
|
1
assets/en_api_index.md.CpTS_pfZ.js
Normal file
1
assets/en_api_index.md.CpTS_pfZ.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as e,c as a,o as t,a4 as c}from"./chunks/framework.DpC1ZpOZ.js";const f=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"en/api/index.md","filePath":"en/api/index.md"}'),p={name:"en/api/index.md"},o=c('<h1 id="mbcp" tabindex="-1">mbcp <a class="header-anchor" href="#mbcp" aria-label="Permalink to "mbcp""></a></h1><p><strong>Description</strong>: 本模块是主模块,提供了一些工具 可导入</p><p><a href="./mp_math/"><code>mbcp.mp_math</code></a>:数学工具</p><p><a href="./particle/"><code>mbcp.particle</code></a>:粒子生成工具</p><p><a href="./presets/"><code>mbcp.presets</code></a>:预设</p>',5),r=[o];function s(n,d,i,_,m,l){return t(),a("div",null,r)}const b=e(p,[["render",s]]);export{f as __pageData,b as default};
|
1
assets/en_api_index.md.CpTS_pfZ.lean.js
Normal file
1
assets/en_api_index.md.CpTS_pfZ.lean.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as e,c as a,o as t,a4 as c}from"./chunks/framework.DpC1ZpOZ.js";const f=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"en/api/index.md","filePath":"en/api/index.md"}'),p={name:"en/api/index.md"},o=c("",5),r=[o];function s(n,d,i,_,m,l){return t(),a("div",null,r)}const b=e(p,[["render",s]]);export{f as __pageData,b as default};
|
@ -1 +0,0 @@
|
|||||||
import{_ as e,c as t,o as a,a4 as c}from"./chunks/framework.DpC1ZpOZ.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"en/api/index.md","filePath":"en/api/index.md"}'),p={name:"en/api/index.md"},o=c('<h1 id="mbcp" tabindex="-1">mbcp <a class="header-anchor" href="#mbcp" aria-label="Permalink to "mbcp""></a></h1><p><strong>Description</strong>: 本模块是主模块,提供了一些工具 可导入</p><p><code>mbcp.mp_math</code>:数学工具</p><p><code>mbcp.particle</code>:粒子生成工具</p><p><code>mbcp.presets</code>:预设</p>',5),n=[o];function s(r,d,i,_,m,l){return a(),t("div",null,n)}const f=e(p,[["render",s]]);export{b as __pageData,f as default};
|
|
@ -1 +0,0 @@
|
|||||||
import{_ as e,c as t,o as a,a4 as c}from"./chunks/framework.DpC1ZpOZ.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"en/api/index.md","filePath":"en/api/index.md"}'),p={name:"en/api/index.md"},o=c("",5),n=[o];function s(r,d,i,_,m,l){return a(),t("div",null,n)}const f=e(p,[["render",s]]);export{b as __pageData,f as default};
|
|
@ -1,22 +1,22 @@
|
|||||||
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 "mbcp.mp_math.vector""></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 "***class*** \`Vector3\`""></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 "***def*** \`__init__(self, x: float, y: float, z: float)\`""></a></h4><p><strong>Description</strong>: 3维向量</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>x: x轴分量</li><li>y: y轴分量</li><li>z: 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 "mbcp.mp_math.vector""></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 "***class*** \`Vector3\`""></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 "***def*** \`__init__(self, x: float, y: float, z: float)\`""></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;"> """</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;"> 3维向量</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>
|
<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: x轴分量</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> x ([\`float\`](https%3A//docs.python.org/3/library/functions.html#float)): x轴分量</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> y: y轴分量</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> y (\`float\`): y轴分量</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> z: z轴分量</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> z (\`float\`): z轴分量</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#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;">.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;">.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) -> bool</code> <a class="header-anchor" href="#def-approx-self-other-vector3-epsilon-float-approx-bool" aria-label="Permalink to "***def*** \`approx(self, other: Vector3, epsilon: float = APPROX) -> bool\`""></a></h4><p><strong>Description</strong>: 判断两个向量是否近似相等。</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other:</li><li>epsilon:</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/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;">'Vector3'</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;">) -> </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="def-approx-self-other-vector3-epsilon-float-approx-bool" tabindex="-1"><em><strong>def</strong></em> <code>approx(self, other: Vector3, epsilon: float = APPROX) -> bool</code> <a class="header-anchor" href="#def-approx-self-other-vector3-epsilon-float-approx-bool" aria-label="Permalink to "***def*** \`approx(self, other: Vector3, epsilon: float = APPROX) -> bool\`""></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;">'Vector3'</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;">) -> </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;"> """</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 判断两个向量是否近似相等。</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 判断两个向量是否近似相等。</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;"> Args:</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> other:</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> other ([\`Vector3\`](#class-vector3)): 另一个向量</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> epsilon:</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> epsilon ([\`float\`](https%3A//docs.python.org/3/library/functions.html#float)): 误差</span></span>
|
||||||
<span class="line"></span>
|
<span class="line"></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;"> 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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否近似相等</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#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;"><</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;"><</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;"><</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) -> AnyAngle</code> <a class="header-anchor" href="#def-cal-angle-self-other-vector3-anyangle" aria-label="Permalink to "***def*** \`cal_angle(self, other: Vector3) -> AnyAngle\`""></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;">'Vector3'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'AnyAngle'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#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;"><</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;"><</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;"><</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) -> AnyAngle</code> <a class="header-anchor" href="#def-cal-angle-self-other-vector3-anyangle" aria-label="Permalink to "***def*** \`cal_angle(self, other: Vector3) -> AnyAngle\`""></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;">'Vector3'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'AnyAngle'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
1
assets/ja_api_api.md.DD7b0jH_.js
Normal file
1
assets/ja_api_api.md.DD7b0jH_.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as a,c as e,o as t,a4 as p}from"./chunks/framework.DpC1ZpOZ.js";const f=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"ja/api/api.md","filePath":"ja/api/api.md"}'),c={name:"ja/api/api.md"},o=p('<h1 id="mbcp" tabindex="-1">mbcp <a class="header-anchor" href="#mbcp" aria-label="Permalink to "mbcp""></a></h1><p><strong>説明</strong>: 本模块是主模块,提供了一些工具 可导入</p><p><a href="./mp_math/"><code>mbcp.mp_math</code></a>:数学工具</p><p><a href="./particle/"><code>mbcp.particle</code></a>:粒子生成工具</p><p><a href="./presets/"><code>mbcp.presets</code></a>:预设</p>',5),r=[o];function s(_,i,d,m,n,l){return t(),e("div",null,r)}const b=a(c,[["render",s]]);export{f as __pageData,b as default};
|
1
assets/ja_api_api.md.DD7b0jH_.lean.js
Normal file
1
assets/ja_api_api.md.DD7b0jH_.lean.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as a,c as e,o as t,a4 as p}from"./chunks/framework.DpC1ZpOZ.js";const f=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"ja/api/api.md","filePath":"ja/api/api.md"}'),c={name:"ja/api/api.md"},o=p("",5),r=[o];function s(_,i,d,m,n,l){return t(),e("div",null,r)}const b=a(c,[["render",s]]);export{f as __pageData,b as default};
|
@ -1 +0,0 @@
|
|||||||
import{_ as e,c as a,o as t,a4 as p}from"./chunks/framework.DpC1ZpOZ.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"ja/api/api.md","filePath":"ja/api/api.md"}'),c={name:"ja/api/api.md"},o=p('<h1 id="mbcp" tabindex="-1">mbcp <a class="header-anchor" href="#mbcp" aria-label="Permalink to "mbcp""></a></h1><p><strong>説明</strong>: 本模块是主模块,提供了一些工具 可导入</p><p><code>mbcp.mp_math</code>:数学工具</p><p><code>mbcp.particle</code>:粒子生成工具</p><p><code>mbcp.presets</code>:预设</p>',5),s=[o];function r(_,i,d,n,m,l){return t(),a("div",null,s)}const f=e(c,[["render",r]]);export{b as __pageData,f as default};
|
|
@ -1 +0,0 @@
|
|||||||
import{_ as e,c as a,o as t,a4 as p}from"./chunks/framework.DpC1ZpOZ.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"ja/api/api.md","filePath":"ja/api/api.md"}'),c={name:"ja/api/api.md"},o=p("",5),s=[o];function r(_,i,d,n,m,l){return t(),a("div",null,s)}const f=e(c,[["render",r]]);export{b as __pageData,f as default};
|
|
@ -1 +1 @@
|
|||||||
import{_ as e,c as a,o as t,a4 as c}from"./chunks/framework.DpC1ZpOZ.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"ja/api/index.md","filePath":"ja/api/index.md"}'),p={name:"ja/api/index.md"},o=c('<h1 id="mbcp" tabindex="-1">mbcp <a class="header-anchor" href="#mbcp" aria-label="Permalink to "mbcp""></a></h1><p><strong>説明</strong>: 本模块是主模块,提供了一些工具 可导入</p><p><code>mbcp.mp_math</code>:数学工具</p><p><code>mbcp.particle</code>:粒子生成工具</p><p><code>mbcp.presets</code>:预设</p>',5),s=[o];function d(r,_,n,i,m,l){return t(),a("div",null,s)}const f=e(p,[["render",d]]);export{b as __pageData,f as default};
|
import{_ as e,c as a,o as t,a4 as c}from"./chunks/framework.DpC1ZpOZ.js";const f=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"ja/api/index.md","filePath":"ja/api/index.md"}'),p={name:"ja/api/index.md"},o=c('<h1 id="mbcp" tabindex="-1">mbcp <a class="header-anchor" href="#mbcp" aria-label="Permalink to "mbcp""></a></h1><p><strong>説明</strong>: 本模块是主模块,提供了一些工具 可导入</p><p><a href="./mp_math/"><code>mbcp.mp_math</code></a>:数学工具</p><p><a href="./particle/"><code>mbcp.particle</code></a>:粒子生成工具</p><p><a href="./presets/"><code>mbcp.presets</code></a>:预设</p>',5),r=[o];function s(d,_,i,n,m,l){return t(),a("div",null,r)}const b=e(p,[["render",s]]);export{f as __pageData,b as default};
|
1
assets/ja_api_index.md.3bCCqhm9.lean.js
Normal file
1
assets/ja_api_index.md.3bCCqhm9.lean.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as e,c as a,o as t,a4 as c}from"./chunks/framework.DpC1ZpOZ.js";const f=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"ja/api/index.md","filePath":"ja/api/index.md"}'),p={name:"ja/api/index.md"},o=c("",5),r=[o];function s(d,_,i,n,m,l){return t(),a("div",null,r)}const b=e(p,[["render",s]]);export{f as __pageData,b as default};
|
@ -1 +0,0 @@
|
|||||||
import{_ as e,c as a,o as t,a4 as c}from"./chunks/framework.DpC1ZpOZ.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"ja/api/index.md","filePath":"ja/api/index.md"}'),p={name:"ja/api/index.md"},o=c("",5),s=[o];function d(r,_,n,i,m,l){return t(),a("div",null,s)}const f=e(p,[["render",d]]);export{b as __pageData,f as default};
|
|
@ -1,22 +1,22 @@
|
|||||||
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 "mbcp.mp_math.vector""></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 "***class*** \`Vector3\`""></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 "***def*** \`__init__(self, x: float, y: float, z: float)\`""></a></h4><p><strong>説明</strong>: 3维向量</p><p><strong>引数</strong>:</p><blockquote><ul><li>x: x轴分量</li><li>y: y轴分量</li><li>z: 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"},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 "mbcp.mp_math.vector""></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 "***class*** \`Vector3\`""></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 "***def*** \`__init__(self, x: float, y: float, z: float)\`""></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;"> """</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;"> 3维向量</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>
|
<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: x轴分量</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> x ([\`float\`](https%3A//docs.python.org/3/library/functions.html#float)): x轴分量</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> y: y轴分量</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> y (\`float\`): y轴分量</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> z: z轴分量</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> z (\`float\`): z轴分量</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#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;">.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;">.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) -> bool</code> <a class="header-anchor" href="#def-approx-self-other-vector3-epsilon-float-approx-bool" aria-label="Permalink to "***def*** \`approx(self, other: Vector3, epsilon: float = APPROX) -> bool\`""></a></h4><p><strong>説明</strong>: 判断两个向量是否近似相等。</p><p><strong>引数</strong>:</p><blockquote><ul><li>other:</li><li>epsilon:</li></ul></blockquote><p><strong>戻り値</strong>: 是否近似相等</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;">'Vector3'</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;">) -> </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="def-approx-self-other-vector3-epsilon-float-approx-bool" tabindex="-1"><em><strong>def</strong></em> <code>approx(self, other: Vector3, epsilon: float = APPROX) -> bool</code> <a class="header-anchor" href="#def-approx-self-other-vector3-epsilon-float-approx-bool" aria-label="Permalink to "***def*** \`approx(self, other: Vector3, epsilon: float = APPROX) -> bool\`""></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;">'Vector3'</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;">) -> </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;"> """</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 判断两个向量是否近似相等。</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 判断两个向量是否近似相等。</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;"> Args:</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> other:</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> other ([\`Vector3\`](#class-vector3)): 另一个向量</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> epsilon:</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> epsilon ([\`float\`](https%3A//docs.python.org/3/library/functions.html#float)): 误差</span></span>
|
||||||
<span class="line"></span>
|
<span class="line"></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;"> 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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否近似相等</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#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;"><</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;"><</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;"><</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) -> AnyAngle</code> <a class="header-anchor" href="#def-cal-angle-self-other-vector3-anyangle" aria-label="Permalink to "***def*** \`cal_angle(self, other: Vector3) -> AnyAngle\`""></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;">'Vector3'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'AnyAngle'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#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;"><</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;"><</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;"><</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) -> AnyAngle</code> <a class="header-anchor" href="#def-cal-angle-self-other-vector3-anyangle" aria-label="Permalink to "***def*** \`cal_angle(self, other: Vector3) -> AnyAngle\`""></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;">'Vector3'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'AnyAngle'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
@ -1 +0,0 @@
|
|||||||
import{_ as e,c as t,o as a,a4 as p}from"./chunks/framework.DpC1ZpOZ.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"zht/api/api.md","filePath":"zht/api/api.md"}'),c={name:"zht/api/api.md"},o=p('<h1 id="mbcp" tabindex="-1">mbcp <a class="header-anchor" href="#mbcp" aria-label="Permalink to "mbcp""></a></h1><p><strong>説明</strong>: 本模块是主模块,提供了一些工具 可导入</p><p><code>mbcp.mp_math</code>:数学工具</p><p><code>mbcp.particle</code>:粒子生成工具</p><p><code>mbcp.presets</code>:预设</p>',5),s=[o];function r(_,i,d,n,m,l){return a(),t("div",null,s)}const f=e(c,[["render",r]]);export{b as __pageData,f as default};
|
|
@ -1 +0,0 @@
|
|||||||
import{_ as e,c as t,o as a,a4 as p}from"./chunks/framework.DpC1ZpOZ.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"zht/api/api.md","filePath":"zht/api/api.md"}'),c={name:"zht/api/api.md"},o=p("",5),s=[o];function r(_,i,d,n,m,l){return a(),t("div",null,s)}const f=e(c,[["render",r]]);export{b as __pageData,f as default};
|
|
1
assets/zht_api_api.md.DgGLhN7H.js
Normal file
1
assets/zht_api_api.md.DgGLhN7H.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as e,c as a,o as t,a4 as p}from"./chunks/framework.DpC1ZpOZ.js";const f=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"zht/api/api.md","filePath":"zht/api/api.md"}'),c={name:"zht/api/api.md"},o=p('<h1 id="mbcp" tabindex="-1">mbcp <a class="header-anchor" href="#mbcp" aria-label="Permalink to "mbcp""></a></h1><p><strong>説明</strong>: 本模块是主模块,提供了一些工具 可导入</p><p><a href="./mp_math/"><code>mbcp.mp_math</code></a>:数学工具</p><p><a href="./particle/"><code>mbcp.particle</code></a>:粒子生成工具</p><p><a href="./presets/"><code>mbcp.presets</code></a>:预设</p>',5),r=[o];function s(_,i,d,m,n,l){return t(),a("div",null,r)}const b=e(c,[["render",s]]);export{f as __pageData,b as default};
|
1
assets/zht_api_api.md.DgGLhN7H.lean.js
Normal file
1
assets/zht_api_api.md.DgGLhN7H.lean.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as e,c as a,o as t,a4 as p}from"./chunks/framework.DpC1ZpOZ.js";const f=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"zht/api/api.md","filePath":"zht/api/api.md"}'),c={name:"zht/api/api.md"},o=p("",5),r=[o];function s(_,i,d,m,n,l){return t(),a("div",null,r)}const b=e(c,[["render",s]]);export{f as __pageData,b as default};
|
@ -1 +0,0 @@
|
|||||||
import{_ as e,c as t,o as a,a4 as c}from"./chunks/framework.DpC1ZpOZ.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"zht/api/index.md","filePath":"zht/api/index.md"}'),p={name:"zht/api/index.md"},o=c("",5),s=[o];function d(r,_,n,i,m,l){return a(),t("div",null,s)}const f=e(p,[["render",d]]);export{b as __pageData,f as default};
|
|
@ -1 +1 @@
|
|||||||
import{_ as e,c as t,o as a,a4 as c}from"./chunks/framework.DpC1ZpOZ.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"zht/api/index.md","filePath":"zht/api/index.md"}'),p={name:"zht/api/index.md"},o=c('<h1 id="mbcp" tabindex="-1">mbcp <a class="header-anchor" href="#mbcp" aria-label="Permalink to "mbcp""></a></h1><p><strong>説明</strong>: 本模块是主模块,提供了一些工具 可导入</p><p><code>mbcp.mp_math</code>:数学工具</p><p><code>mbcp.particle</code>:粒子生成工具</p><p><code>mbcp.presets</code>:预设</p>',5),s=[o];function d(r,_,n,i,m,l){return a(),t("div",null,s)}const f=e(p,[["render",d]]);export{b as __pageData,f as default};
|
import{_ as e,c as t,o as a,a4 as c}from"./chunks/framework.DpC1ZpOZ.js";const f=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"zht/api/index.md","filePath":"zht/api/index.md"}'),p={name:"zht/api/index.md"},o=c('<h1 id="mbcp" tabindex="-1">mbcp <a class="header-anchor" href="#mbcp" aria-label="Permalink to "mbcp""></a></h1><p><strong>説明</strong>: 本模块是主模块,提供了一些工具 可导入</p><p><a href="./mp_math/"><code>mbcp.mp_math</code></a>:数学工具</p><p><a href="./particle/"><code>mbcp.particle</code></a>:粒子生成工具</p><p><a href="./presets/"><code>mbcp.presets</code></a>:预设</p>',5),r=[o];function s(d,_,i,n,m,l){return a(),t("div",null,r)}const b=e(p,[["render",s]]);export{f as __pageData,b as default};
|
1
assets/zht_api_index.md.DNSdsCcq.lean.js
Normal file
1
assets/zht_api_index.md.DNSdsCcq.lean.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
import{_ as e,c as t,o as a,a4 as c}from"./chunks/framework.DpC1ZpOZ.js";const f=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","lastUpdated":false,"collapsed":true},"headers":[],"relativePath":"zht/api/index.md","filePath":"zht/api/index.md"}'),p={name:"zht/api/index.md"},o=c("",5),r=[o];function s(d,_,i,n,m,l){return a(),t("div",null,r)}const b=e(p,[["render",s]]);export{f as __pageData,b as default};
|
@ -1,22 +1,22 @@
|
|||||||
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":"zht/api/mp_math/vector.md","filePath":"zht/api/mp_math/vector.md"}'),n={name:"zht/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 "mbcp.mp_math.vector""></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 "***class*** \`Vector3\`""></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 "***def*** \`__init__(self, x: float, y: float, z: float)\`""></a></h4><p><strong>説明</strong>: 3维向量</p><p><strong>變數説明</strong>:</p><blockquote><ul><li>x: x轴分量</li><li>y: y轴分量</li><li>z: 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":"zht/api/mp_math/vector.md","filePath":"zht/api/mp_math/vector.md"}'),n={name:"zht/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 "mbcp.mp_math.vector""></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 "***class*** \`Vector3\`""></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 "***def*** \`__init__(self, x: float, y: float, z: float)\`""></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;"> """</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;"> 3维向量</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>
|
<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: x轴分量</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> x ([\`float\`](https%3A//docs.python.org/3/library/functions.html#float)): x轴分量</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> y: y轴分量</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> y (\`float\`): y轴分量</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> z: z轴分量</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> z (\`float\`): z轴分量</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#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;">.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;">.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) -> bool</code> <a class="header-anchor" href="#def-approx-self-other-vector3-epsilon-float-approx-bool" aria-label="Permalink to "***def*** \`approx(self, other: Vector3, epsilon: float = APPROX) -> bool\`""></a></h4><p><strong>説明</strong>: 判断两个向量是否近似相等。</p><p><strong>變數説明</strong>:</p><blockquote><ul><li>other:</li><li>epsilon:</li></ul></blockquote><p><strong>返回</strong>: 是否近似相等</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;">'Vector3'</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;">) -> </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="def-approx-self-other-vector3-epsilon-float-approx-bool" tabindex="-1"><em><strong>def</strong></em> <code>approx(self, other: Vector3, epsilon: float = APPROX) -> bool</code> <a class="header-anchor" href="#def-approx-self-other-vector3-epsilon-float-approx-bool" aria-label="Permalink to "***def*** \`approx(self, other: Vector3, epsilon: float = APPROX) -> bool\`""></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;">'Vector3'</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;">) -> </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;"> """</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 判断两个向量是否近似相等。</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 判断两个向量是否近似相等。</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;"> Args:</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> other:</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> other ([\`Vector3\`](#class-vector3)): 另一个向量</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> epsilon:</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> epsilon ([\`float\`](https%3A//docs.python.org/3/library/functions.html#float)): 误差</span></span>
|
||||||
<span class="line"></span>
|
<span class="line"></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;"> 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;"> [\`bool\`](https%3A//docs.python.org/3/library/functions.html#bool): 是否近似相等</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#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;"><</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;"><</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;"><</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) -> AnyAngle</code> <a class="header-anchor" href="#def-cal-angle-self-other-vector3-anyangle" aria-label="Permalink to "***def*** \`cal_angle(self, other: Vector3) -> AnyAngle\`""></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;">'Vector3'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'AnyAngle'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#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;"><</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;"><</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;"><</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) -> AnyAngle</code> <a class="header-anchor" href="#def-cal-angle-self-other-vector3-anyangle" aria-label="Permalink to "***def*** \`cal_angle(self, other: Vector3) -> AnyAngle\`""></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;">'Vector3'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -> </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'AnyAngle'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> """</span></span>
|
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
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
@ -1 +1 @@
|
|||||||
{"api_api.md":"cuvEYHFe","api_index.md":"9xfR5bUd","api_mp_math_angle.md":"3Na5IaYp","api_mp_math_const.md":"O6cTulwX","api_mp_math_equation.md":"z85zyCZL","api_mp_math_function.md":"BhmJqpOo","api_mp_math_index.md":"DHhPNV6R","api_mp_math_line.md":"Dovi6bdM","api_mp_math_mp_math.md":"mVabZTHd","api_mp_math_mp_math_typing.md":"CEryCREV","api_mp_math_plane.md":"Dv-GWbJg","api_mp_math_point.md":"BvvrKTY8","api_mp_math_segment.md":"_n__ViVt","api_mp_math_utils.md":"kW3A-lG9","api_mp_math_vector.md":"DvJcuPXW","api_particle_index.md":"BxLVuqry","api_particle_particle.md":"CioLG9Ab","api_presets_index.md":"C7sBj6Q8","api_presets_model_index.md":"F2zeh9P2","api_presets_model_model.md":"BoocA59j","api_presets_presets.md":"kIUJtfck","demo_index.md":"CVAdlaFI","en_api_api.md":"6DYwgQwO","en_api_index.md":"D1elhNgk","en_api_mp_math_angle.md":"09R7pxw_","en_api_mp_math_const.md":"DjbxFoGO","en_api_mp_math_equation.md":"DBXwIC0s","en_api_mp_math_function.md":"nJ-E5W5r","en_api_mp_math_index.md":"ypHGEnmb","en_api_mp_math_line.md":"D0AfsxWD","en_api_mp_math_mp_math.md":"5IisTIt3","en_api_mp_math_mp_math_typing.md":"DWjztCj6","en_api_mp_math_plane.md":"3xsZdWoR","en_api_mp_math_point.md":"CxCgy181","en_api_mp_math_segment.md":"BevquOvV","en_api_mp_math_utils.md":"rVP-A71G","en_api_mp_math_vector.md":"DMwD59YV","en_api_particle_index.md":"NezC90nG","en_api_particle_particle.md":"BTk7xB-d","en_api_presets_index.md":"Clhg0YLX","en_api_presets_model_index.md":"_hbR1U40","en_api_presets_model_model.md":"B9FfcMgc","en_api_presets_presets.md":"5pMosEdX","en_guide_index.md":"C3kI8f8A","en_index.md":"D5CddOW-","en_refer_index.md":"Cq6GWi0V","guide_index.md":"BVhQ0kPy","index.md":"DJWBRkUz","ja_api_api.md":"GOuCj9Bq","ja_api_index.md":"DcZ9h1gI","ja_api_mp_math_angle.md":"CAq1hHov","ja_api_mp_math_const.md":"CACmM3Q4","ja_api_mp_math_equation.md":"CwX1EUnA","ja_api_mp_math_function.md":"BpyLWMmS","ja_api_mp_math_index.md":"B_UDRWJp","ja_api_mp_math_line.md":"BzytbSsM","ja_api_mp_math_mp_math.md":"DGl-Yqoj","ja_api_mp_math_mp_math_typing.md":"BANGfx9Q","ja_api_mp_math_plane.md":"Bw6ecTDW","ja_api_mp_math_point.md":"CFCWaCvm","ja_api_mp_math_segment.md":"cuLLXTSO","ja_api_mp_math_utils.md":"CrPKk6ui","ja_api_mp_math_vector.md":"PFGJik39","ja_api_particle_index.md":"SXvJHpqE","ja_api_particle_particle.md":"DpDqAPA7","ja_api_presets_index.md":"DrJ0aeZq","ja_api_presets_model_index.md":"ub3RsBC9","ja_api_presets_model_model.md":"Dw-6mfuk","ja_api_presets_presets.md":"Bm4b0yEm","ja_guide_index.md":"w1Tf2Adm","ja_index.md":"DnsqZi7i","ja_refer_index.md":"DamUscs8","refer_function_curry.md":"D_oqRDd3","refer_function_function.md":"Bi_82lIJ","refer_index.md":"yFZW0kI4","zht_api_api.md":"Ceti9rhA","zht_api_index.md":"D2vE-hK0","zht_api_mp_math_angle.md":"xBQ5jf2w","zht_api_mp_math_const.md":"DhnGo46u","zht_api_mp_math_equation.md":"CNqNdo8e","zht_api_mp_math_function.md":"BYw-sqJL","zht_api_mp_math_index.md":"C-ytwIT_","zht_api_mp_math_line.md":"BKWlVJmv","zht_api_mp_math_mp_math.md":"WAo96wsQ","zht_api_mp_math_mp_math_typing.md":"2475K9x4","zht_api_mp_math_plane.md":"Cbo0QRQD","zht_api_mp_math_point.md":"Ci0RyJlm","zht_api_mp_math_segment.md":"D_xbGo8n","zht_api_mp_math_utils.md":"BsNVdUjt","zht_api_mp_math_vector.md":"CelHQ_68","zht_api_particle_index.md":"C8wv1sGB","zht_api_particle_particle.md":"DLxDzJsb","zht_api_presets_index.md":"CKWpXp08","zht_api_presets_model_index.md":"a46BvX0I","zht_api_presets_model_model.md":"C8PKDM2B","zht_api_presets_presets.md":"nxuS_hT6","zht_guide_index.md":"BNnMViC8","zht_index.md":"CUR8-QXm","zht_refer_index.md":"B7CQS2UW"}
|
{"api_api.md":"rnPOv6-O","api_index.md":"qnrSd__i","api_mp_math_angle.md":"3Na5IaYp","api_mp_math_const.md":"O6cTulwX","api_mp_math_equation.md":"z85zyCZL","api_mp_math_function.md":"BhmJqpOo","api_mp_math_index.md":"DHhPNV6R","api_mp_math_line.md":"Dovi6bdM","api_mp_math_mp_math.md":"mVabZTHd","api_mp_math_mp_math_typing.md":"CEryCREV","api_mp_math_plane.md":"Dv-GWbJg","api_mp_math_point.md":"BvvrKTY8","api_mp_math_segment.md":"_n__ViVt","api_mp_math_utils.md":"kW3A-lG9","api_mp_math_vector.md":"mCFa4Azm","api_particle_index.md":"BxLVuqry","api_particle_particle.md":"CioLG9Ab","api_presets_index.md":"C7sBj6Q8","api_presets_model_index.md":"F2zeh9P2","api_presets_model_model.md":"BoocA59j","api_presets_presets.md":"kIUJtfck","demo_index.md":"CVAdlaFI","en_api_api.md":"D31N0-_j","en_api_index.md":"CpTS_pfZ","en_api_mp_math_angle.md":"09R7pxw_","en_api_mp_math_const.md":"DjbxFoGO","en_api_mp_math_equation.md":"DBXwIC0s","en_api_mp_math_function.md":"nJ-E5W5r","en_api_mp_math_index.md":"ypHGEnmb","en_api_mp_math_line.md":"D0AfsxWD","en_api_mp_math_mp_math.md":"5IisTIt3","en_api_mp_math_mp_math_typing.md":"DWjztCj6","en_api_mp_math_plane.md":"3xsZdWoR","en_api_mp_math_point.md":"CxCgy181","en_api_mp_math_segment.md":"BevquOvV","en_api_mp_math_utils.md":"rVP-A71G","en_api_mp_math_vector.md":"BEIFYOwe","en_api_particle_index.md":"NezC90nG","en_api_particle_particle.md":"BTk7xB-d","en_api_presets_index.md":"Clhg0YLX","en_api_presets_model_index.md":"_hbR1U40","en_api_presets_model_model.md":"B9FfcMgc","en_api_presets_presets.md":"5pMosEdX","en_guide_index.md":"C3kI8f8A","en_index.md":"D5CddOW-","en_refer_index.md":"Cq6GWi0V","guide_index.md":"BVhQ0kPy","index.md":"DJWBRkUz","ja_api_api.md":"DD7b0jH_","ja_api_index.md":"3bCCqhm9","ja_api_mp_math_angle.md":"CAq1hHov","ja_api_mp_math_const.md":"CACmM3Q4","ja_api_mp_math_equation.md":"CwX1EUnA","ja_api_mp_math_function.md":"BpyLWMmS","ja_api_mp_math_index.md":"B_UDRWJp","ja_api_mp_math_line.md":"BzytbSsM","ja_api_mp_math_mp_math.md":"DGl-Yqoj","ja_api_mp_math_mp_math_typing.md":"BANGfx9Q","ja_api_mp_math_plane.md":"Bw6ecTDW","ja_api_mp_math_point.md":"CFCWaCvm","ja_api_mp_math_segment.md":"cuLLXTSO","ja_api_mp_math_utils.md":"CrPKk6ui","ja_api_mp_math_vector.md":"mfFeokXv","ja_api_particle_index.md":"SXvJHpqE","ja_api_particle_particle.md":"DpDqAPA7","ja_api_presets_index.md":"DrJ0aeZq","ja_api_presets_model_index.md":"ub3RsBC9","ja_api_presets_model_model.md":"Dw-6mfuk","ja_api_presets_presets.md":"Bm4b0yEm","ja_guide_index.md":"w1Tf2Adm","ja_index.md":"DnsqZi7i","ja_refer_index.md":"DamUscs8","refer_function_curry.md":"D_oqRDd3","refer_function_function.md":"Bi_82lIJ","refer_index.md":"yFZW0kI4","zht_api_api.md":"DgGLhN7H","zht_api_index.md":"DNSdsCcq","zht_api_mp_math_angle.md":"xBQ5jf2w","zht_api_mp_math_const.md":"DhnGo46u","zht_api_mp_math_equation.md":"CNqNdo8e","zht_api_mp_math_function.md":"BYw-sqJL","zht_api_mp_math_index.md":"C-ytwIT_","zht_api_mp_math_line.md":"BKWlVJmv","zht_api_mp_math_mp_math.md":"WAo96wsQ","zht_api_mp_math_mp_math_typing.md":"2475K9x4","zht_api_mp_math_plane.md":"Cbo0QRQD","zht_api_mp_math_point.md":"Ci0RyJlm","zht_api_mp_math_segment.md":"D_xbGo8n","zht_api_mp_math_utils.md":"BsNVdUjt","zht_api_mp_math_vector.md":"vRujd3bN","zht_api_particle_index.md":"C8wv1sGB","zht_api_particle_particle.md":"DLxDzJsb","zht_api_presets_index.md":"CKWpXp08","zht_api_presets_model_index.md":"a46BvX0I","zht_api_presets_model_model.md":"C8PKDM2B","zht_api_presets_presets.md":"nxuS_hT6","zht_guide_index.md":"BNnMViC8","zht_index.md":"CUR8-QXm","zht_refer_index.md":"B7CQS2UW"}
|
||||||
|
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
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user