mbcp/en/api/mp_math/point.html

74 lines
45 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>mbcp.mp_math.point | MBCP docs</title>
<meta name="description" content="A library made for Minecraft particle generation">
<meta name="generator" content="VitePress v1.3.4">
<link rel="preload stylesheet" href="/assets/style.Bb0QBJmh.css" as="style">
<script type="module" src="/assets/app.l1Ut0uce.js"></script>
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="modulepreload" href="/assets/chunks/theme.BPuUWxkA.js">
<link rel="modulepreload" href="/assets/chunks/framework.BV61Qrc0.js">
<link rel="modulepreload" href="/assets/en_api_mp_math_point.md.DMig0FI1.lean.js">
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
</head>
<body>
<div id="app"><div class="Layout" data-v-8e016544><!--[--><!--]--><!--[--><span tabindex="-1" data-v-efdf7a7d></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-efdf7a7d> Skip to content </a><!--]--><!----><header class="VPNav" data-v-8e016544 data-v-0c3b3583><div class="VPNavBar has-sidebar top" data-v-0c3b3583 data-v-af8d762d><div class="wrapper" data-v-af8d762d><div class="container" data-v-af8d762d><div class="title" data-v-af8d762d><div class="VPNavBarTitle has-sidebar" data-v-af8d762d data-v-73c882b0><a class="title" href="/en/" data-v-73c882b0><!--[--><!--]--><!----><span data-v-73c882b0>MBCP docs</span><!--[--><!--]--></a></div></div><div class="content" data-v-af8d762d><div class="content-body" data-v-af8d762d><!--[--><!--]--><div class="VPNavBarSearch search" data-v-af8d762d><!----></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-af8d762d data-v-ae469694><span id="main-nav-aria-label" class="visually-hidden" data-v-ae469694> Main Navigation </span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/guide.html" tabindex="0" data-v-ae469694 data-v-4ca2fdac><!--[--><span data-v-4ca2fdac>Get Start</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/api/" tabindex="0" data-v-ae469694 data-v-4ca2fdac><!--[--><span data-v-4ca2fdac>API Document</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/demo/" tabindex="0" data-v-ae469694 data-v-4ca2fdac><!--[--><span data-v-4ca2fdac>Demo</span><!--]--></a><!--]--><!--]--></nav><div class="VPFlyout VPNavBarTranslations translations" data-v-af8d762d data-v-ba521018 data-v-6d56b0ed><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="Change language" data-v-6d56b0ed><span class="text" data-v-6d56b0ed><span class="vpi-languages option-icon" data-v-6d56b0ed></span><!----><span class="vpi-chevron-down text-icon" data-v-6d56b0ed></span></span></button><div class="menu" data-v-6d56b0ed><div class="VPMenu" data-v-6d56b0ed data-v-36a6a4be><!----><!--[--><!--[--><div class="items" data-v-ba521018><p class="title" data-v-ba521018>English</p><!--[--><div class="VPMenuLink" data-v-ba521018 data-v-a9b5eada><a class="VPLink link" href="/api/mp_math/point.html" data-v-a9b5eada><!--[-->简体中文<!--]--></a></div><div class="VPMenuLink" data-v-ba521018 data-v-a9b5eada><a class="VPLink link" href="/ja/api/mp_math/point.html" data-v-a9b5eada><!--[-->日本語<!--]--></a></div><div class="VPMenuLink" data-v-ba521018 data-v-a9b5eada><a class="VPLink link" href="/zht/api/mp_math/point.html" data-v-a9b5eada><!--[-->繁體中文<!--]--></a></div><!--]--></div><!--]--><!--]--></div></div></div><div class="VPNavBarAppearance appearance" data-v-af8d762d data-v-fd625bab><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="Switch to dark theme" aria-checked="false" data-v-fd625bab data-v-38c704f2 data-v-793caf05><span class="check" data-v-793caf05><span class="icon" data-v-793caf05><!--[--><span class="vpi-sun sun" data-v-38c704f2></span><span class="vpi-moon moon" data-v-38c704f2></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-af8d762d data-v-9b3d2141 data-v-0ada25a4><!--[--><a class="VPSocialLink no-icon" href="https://github.com/snowykami/mbcp" aria-label="github" target="_blank" rel="noopener" data-v-0ada25a4 data-v-36d54f99><span class="vpi-social-github" /></a><!--]--></div><div class="VPFlyout VPNavBarExtra extra" data-v-af8d762d data-v-8ac0e455 data-v-6d56b0ed><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-6d56b0ed><span class="vpi-more-horizontal icon" data-v-6d56b0ed></span></button><div class="menu" data-v-6d56b0ed><div class="VPMenu" data-v-6d56b0ed data-v-36a6a4be><!----><!--[--><!--[--><div class="group translations" data-v-8ac0e455><p class="trans-title" data-v-8ac0e455>English</p><!--[--><div class="VPMenuLink" data-v-8ac0e455 data-v-a9b5eada><a class="VPLink link" href
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 笛卡尔坐标系中的点。</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> x: 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;"> z: z 坐标</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> x</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> y</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> z</span></span></code></pre></div></details><h3 id="method-approx-self-other-point3-epsilon-float-approx-bool" tabindex="-1"><em><strong>method</strong></em> <code>approx(self, other: Point3, epsilon: float = APPROX) -&gt; bool</code> <a class="header-anchor" href="#method-approx-self-other-point3-epsilon-float-approx-bool" aria-label="Permalink to &quot;***method*** `approx(self, other: Point3, epsilon: float = APPROX) -&gt; bool`&quot;"></a></h3><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></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> approx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, epsilon: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">float</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">APPROX</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">bool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 判断两个点是否近似相等。</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
<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;"> epsilon:</span></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;"> 是否近似相等</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> all</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">([</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">abs</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> epsilon])</span></span></code></pre></div></details><h3 id="overload" tabindex="-1"><code>@overload</code> <a class="header-anchor" href="#overload" aria-label="Permalink to &quot;`@overload`&quot;"></a></h3><h3 id="method-self-other-vector3-point3" tabindex="-1"><em><strong>method</strong></em> <code>self + other: Vector3 =&gt; Point3</code> <a class="header-anchor" href="#method-self-other-vector3-point3" aria-label="Permalink to &quot;***method*** `self + other: Vector3 =&gt; Point3`&quot;"></a></h3><details><summary><b>Source code</b></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@overload</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __add__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h3 id="overload-1" tabindex="-1"><code>@overload</code> <a class="header-anchor" href="#overload-1" aria-label="Permalink to &quot;`@overload`&quot;"></a></h3><h3 id="method-self-other-point3-point3" tabindex="-1"><em><strong>method</strong></em> <code>self + other: Point3 =&gt; Point3</code> <a class="header-anchor" href="#method-self-other-point3-point3" aria-label="Permalink to &quot;***method*** `self + other: Point3 =&gt; Point3`&quot;"></a></h3><details><summary><b>Source code</b></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">@overload</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __add__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span></span></code></pre></div></details><h3 id="method-self-other" tabindex="-1"><em><strong>method</strong></em> <code>self + other</code> <a class="header-anchor" href="#method-self-other" aria-label="Permalink to &quot;***method*** `self + other`&quot;"></a></h3><p><strong>Description</strong>: P + V -&gt; P P + P -&gt; P</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other:</li></ul></blockquote><details><summary><b>Source code</b></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __add__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> P + V -&gt; P</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> P + P -&gt; P</span></span>
<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;"> Returns:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</span></span></code></pre></div></details><h3 id="method-eq-self-other" tabindex="-1"><em><strong>method</strong></em> <code>__eq__(self, other)</code> <a class="header-anchor" href="#method-eq-self-other" aria-label="Permalink to &quot;***method*** `__eq__(self, other)`&quot;"></a></h3><p><strong>Description</strong>: 判断两个点是否相等。</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other:</li></ul></blockquote><details><summary><b>Source code</b></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __eq__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other):</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 判断两个点是否相等。</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Args:</span></span>
<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;"> Returns:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> approx(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x, other.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> approx(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y, other.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">and</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> approx(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z, other.z)</span></span></code></pre></div></details><h3 id="method-self-other-point3-vector3" tabindex="-1"><em><strong>method</strong></em> <code>self - other: Point3 =&gt; Vector3</code> <a class="header-anchor" href="#method-self-other-point3-vector3" aria-label="Permalink to &quot;***method*** `self - other: Point3 =&gt; Vector3`&quot;"></a></h3><p><strong>Description</strong>: P - P -&gt; V</p><p>P - V -&gt; P 已在 :class:<code>Vector3</code> 中实现</p><p><strong>Arguments</strong>:</p><blockquote><ul><li>other:</li></ul></blockquote><details><summary><b>Source code</b></summary><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">def</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> __sub__</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(self, other: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Point3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) -&gt; </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Vector3&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> P - P -&gt; V</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> P - V -&gt; P 已在 :class:`Vector3` 中实现</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;"> Returns:</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> from</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> .vector </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Vector3(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.x, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.y, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> other.z)</span></span></code></pre></div></details></div></div></main><footer class="VPDocFooter" data-v-aa782c77 data-v-f33b051d><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-f33b051d><span class="visually-hidden" id="doc-footer-aria-label" data-v-f33b051d>Pager</span><div class="pager" data-v-f33b051d><a class="VPLink link pager-link prev" href="/en/api/mp_math/plane.html" data-v-f33b051d><!--[--><span class="desc" data-v-f33b051d>Previous page</span><span class="title" data-v-f33b051d>mbcp.mp_math.plane</span><!--]--></a></div><div class="pager" data-v-f33b051d><a class="VPLink link pager-link next" href="/en/api/mp_math/segment.html" data-v-f33b051d><!--[--><span class="desc" data-v-f33b051d>Next page</span><span class="title" data-v-f33b051d>mbcp.mp_math.segment</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"api-ex.md\":\"DOsKaL8H\",\"api_index.md\":\"BvazTqTB\",\"api_mp_math_angle.md\":\"eAy7w1HN\",\"api_mp_math_const.md\":\"D9zs7__H\",\"api_mp_math_equation.md\":\"Cug6-NqN\",\"api_mp_math_index.md\":\"4P0hk6gb\",\"api_mp_math_line.md\":\"DsJQDchM\",\"api_mp_math_mp_math_typing.md\":\"COrE_fd3\",\"api_mp_math_plane.md\":\"CmoVvPiw\",\"api_mp_math_point.md\":\"ClJD85mP\",\"api_mp_math_segment.md\":\"7jBtS4F1\",\"api_mp_math_utils.md\":\"BMwtm7TJ\",\"api_mp_math_vector.md\":\"CROCIDXX\",\"api_particle_index.md\":\"BRCSxC3e\",\"api_presets_index.md\":\"Dl6Ss91J\",\"api_presets_model_index.md\":\"DUZx13AW\",\"en_api_index.md\":\"Bgu-LD1B\",\"en_api_mp_math_angle.md\":\"BuhpKHnt\",\"en_api_mp_math_const.md\":\"D_Flpj8t\",\"en_api_mp_math_equation.md\":\"YQDGr03a\",\"en_api_mp_math_index.md\":\"DrjDUYBY\",\"en_api_mp_math_line.md\":\"BEvxdWYQ\",\"en_api_mp_math_mp_math_typing.md\":\"CyXXFdS4\",\"en_api_mp_math_plane.md\":\"DUu9P3nM\",\"en_api_mp_math_point.md\":\"DMig0FI1\",\"en_api_mp_math_segment.md\":\"CcaokAF8\",\"en_api_mp_math_utils.md\":\"DZohqw2b\",\"en_api_mp_math_vector.md\":\"Sd_IZsgE\",\"en_api_particle_index.md\":\"CmC1QX5o\",\"en_api_presets_index.md\":\"CZ5hl_7D\",\"en_api_presets_model_index.md\":\"Cs8vON2C\",\"guide_index.md\":\"BE2yloik\",\"index.md\":\"BE1qChTt\",\"ja_api_index.md\":\"4BnflFIm\",\"ja_api_mp_math_angle.md\":\"DL9J6RE2\",\"ja_api_mp_math_const.md\":\"CyaIJkFx\",\"ja_api_mp_math_equation.md\":\"tmRhsqm6\",\"ja_api_mp_math_index.md\":\"CSAMHYsB\",\"ja_api_mp_math_line.md\":\"fj-_s5Ug\",\"ja_api_mp_math_mp_math_typing.md\":\"Bl5kyhpI\",\"ja_api_mp_math_plane.md\":\"yLekgCvK\",\"ja_api_mp_math_point.md\":\"CpHHrSk8\",\"ja_api_mp_math_segment.md\":\"CB1_z-rn\",\"ja_api_mp_math_utils.md\":\"BrfEEfl-\",\"ja_api_mp_math_vector.md\":\"p54TKACE\",\"ja_api_particle_index.md\":\"E2YnH7EN\",\"ja_api_presets_index.md\":\"ATGcHt9d\",\"ja_api_presets_model_index.md\":\"D8yZmO5R\",\"md-ex.md\":\"BX0WqOqv\",\"zht_api_index.md\":\"Dq4XPUKZ\",\"zht_api_mp_math_angle.md\":\"B4T6L25M\",\"zht_api_mp_math_const.md\":\"B8uQOIr_\",\"zht_api_mp_math_equation.md\":\"5p50czv3\",\"zht_api_mp_math_index.md\":\"D09y2ubg\",\"zht_api_mp_math_line.md\":\"DYC1X0oD\",\"zht_api_mp_math_mp_math_typing.md\":\"DLx0IibM\",\"zht_api_mp_math_plane.md\":\"B6GWRRF6\",\"zht_api_mp_math_point.md\":\"Bm1IEwlI\",\"zht_api_mp_math_segment.md\":\"Bop8t2IE\",\"zht_api_mp_math_utils.md\":\"CERv8c-M\",\"zht_api_mp_math_vector.md\":\"BTWxlpB1\",\"zht_api_particle_index.md\":\"kAm9VAEw\",\"zht_api_presets_index.md\":\"BmouaEaT\",\"zht_api_presets_model_index.md\":\"SQ5PPdaL\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"MBCP docs\",\"description\":\"MBCP library docs\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/snowykami/mbcp\"}],\"sidebar\":{\"/api/\":[{\"text\":\"api\",\"items\":[{\"text\":\"mbcp\",\"link\":\"/api/index.md\"},{\"text\":\"mp_math\",\"items\":[{\"text\":\"mbcp.mp_math\",\"link\":\"/api/mp_math/index.md\"},{\"text\":\"mbcp.mp_math.angle\",\"link\":\"/api/mp_math/angle.md\"},{\"text\":\"mbcp.mp_math.const\",\"link\":\"/api/mp_math/const.md\"},{\"text\":\"mbcp.mp_math.equation\",\"link\":\"/api/mp_math/equation.md\"},{\"text\":\"mbcp.mp_math.line\",\"link\":\"/api/mp_math/line.md\"},{\"text\":\"mbcp.mp_math.mp_math_typing\",\"link\":\"/api/mp_math/mp_math_typing.md\"},{\"text\":\"mbcp.mp_math.plane\",\"link\":\"/api/mp_math/plane.md\"},{\"text\":\"mbcp.mp_math.point\",\"link\":\"/api/mp_math/point.md\"},{\"text\":\"mbcp.mp_math.segment\",\"link\":\"/api/mp_math/segment.md\"},{\"text\":\"mbcp.mp_math.utils\",\"link\":\"/api/mp_math/utils.md\"},{\"text\":\"mbcp.mp_math.vector\",\"link\":\"/api/mp_math/vector.md\"}]},{\"text\":\"particle\",\"items\":[{\"text\":\"mbcp.particle\",\"link\":\"/api/particle/index.md\"}]},{\"text\":\"presets\",\"items\":[{\"text\":\"mbcp.presets\",\"link\":\"/api/presets/index.md\"},{\"text\":\"model
</body>
</html>