2024-08-29 13:25:00 +08:00
<!DOCTYPE html>
< html lang = "zh-Hant" dir = "ltr" >
< head >
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width,initial-scale=1" >
2024-08-31 06:08:36 +08:00
< title > mbcp.mp_math.point | MBCP 文檔< / title >
< meta name = "description" content = "MBCP 粒子計算和生成庫文檔" >
2024-08-29 13:25:00 +08:00
< meta name = "generator" content = "VitePress v1.3.4" >
2024-08-31 07:55:26 +08:00
< link rel = "preload stylesheet" href = "/assets/style.UiSpMRXd.css" as = "style" >
2024-08-29 13:25:00 +08:00
2024-08-31 07:55:26 +08:00
< script type = "module" src = "/assets/app.Cz-vVA-m.js" > < / script >
< link rel = "modulepreload" href = "/assets/chunks/theme.BH7CkR6t.js" >
< link rel = "modulepreload" href = "/assets/chunks/framework.DpC1ZpOZ.js" >
< link rel = "modulepreload" href = "/assets/zht_api_mp_math_point.md.DdPny4Ep.lean.js" >
2024-08-31 06:08:36 +08:00
< link rel = "icon" type = "image/svg+xml" href = "/mbcp-logo.svg" >
2024-08-31 07:31:49 +08:00
< link rel = "stylesheet" href = "https://fonts.font.im/css?family=Cousine:400,400i,700,700i|Poppins:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i" >
2024-08-29 13:25:00 +08:00
< script id = "check-dark-mode" > ( ( ) => { const e = localStorage . getItem ( "vitepress-theme-appearance" ) || "auto" , a = window . matchMedia ( "(prefers-color-scheme: dark)" ) . matches ; ( ! e || e === "auto" ? a : e === "dark" ) && document . documentElement . classList . add ( "dark" ) } ) ( ) ; < / script >
< script id = "check-mac-os" > document . documentElement . classList . toggle ( "mac" , /Mac|iPhone|iPod|iPad/i . test ( navigator . platform ) ) ; < / script >
< / head >
< body >
2024-08-31 07:55:26 +08:00
< div id = "app" > < div class = "Layout" data-v-22f859ac > <!-- [ --> <!-- ] --> <!-- [ --> < span tabindex = "-1" data-v-3e86afbf > < / span > < a href = "#VPContent" class = "VPSkipLink visually-hidden" data-v-3e86afbf > Skip to content < / a > <!-- ] --> <!-- --> < header class = "VPNav" data-v-22f859ac data-v-2a4e514e > < div class = "VPNavBar has-sidebar top" data-v-2a4e514e data-v-1303e283 > < div class = "wrapper" data-v-1303e283 > < div class = "container" data-v-1303e283 > < div class = "title" data-v-1303e283 > < div class = "VPNavBarTitle has-sidebar" data-v-1303e283 data-v-10b95b50 > < a class = "title" href = "/zht/" data-v-10b95b50 > <!-- [ --> <!-- ] --> <!-- [ --> < img class = "VPImage logo" src = "/mbcp-logo.svg" alt data-v-f925500d > <!-- ] --> < span data-v-10b95b50 > MBCP 文檔< / span > <!-- [ --> <!-- ] --> < / a > < / div > < / div > < div class = "content" data-v-1303e283 > < div class = "content-body" data-v-1303e283 > <!-- [ --> <!-- ] --> < div class = "VPNavBarSearch search" data-v-1303e283 > <!-- [ --> <!-- --> < div id = "local-search" > < button type = "button" class = "DocSearch DocSearch-Button" aria-label = "打開搜索框" > < span class = "DocSearch-Button-Container" > < span class = "vp-icon DocSearch-Search-Icon" > < / span > < span class = "DocSearch-Button-Placeholder" > 搜索文檔< / span > < / span > < span class = "DocSearch-Button-Keys" > < kbd class = "DocSearch-Button-Key" > < / kbd > < kbd class = "DocSearch-Button-Key" > K< / kbd > < / span > < / button > < / div > <!-- ] --> < / div > < nav aria-labelledby = "main-nav-aria-label" class = "VPNavBarMenu menu" data-v-1303e283 data-v-0fb289c1 > < span id = "main-nav-aria-label" class = "visually-hidden" data-v-0fb289c1 > Main Navigation < / span > <!-- [ --> <!-- [ --> < a class = "VPLink link VPNavBarMenuLink" href = "/zht/guide/" tabindex = "0" data-v-0fb289c1 data-v-ad4a8b64 > <!-- [ --> < span data-v-ad4a8b64 > 指引< / span > <!-- ] --> < / a > <!-- ] --> <!-- [ --> < a class = "VPLink link VPNavBarMenuLink" href = "/zht/refer.html" tabindex = "0" data-v-0fb289c1 data-v-ad4a8b64 > <!-- [ --> < span data-v-ad4a8b64 > 參考< / span > <!-- ] --> < / a > <!-- ] --> <!-- [ --> < a class = "VPLink link VPNavBarMenuLink" href = "/zht/api/" tabindex = "0" data-v-0fb289c1 data-v-ad4a8b64 > <!-- [ --> < span data-v-ad4a8b64 > API引用< / span > <!-- ] --> < / a > <!-- ] --> <!-- [ --> < a class = "VPLink link VPNavBarMenuLink" href = "/zht/demo/" tabindex = "0" data-v-0fb289c1 data-v-ad4a8b64 > <!-- [ --> < span data-v-ad4a8b64 > 示範< / span > <!-- ] --> < / a > <!-- ] --> <!-- ] --> < / nav > < div class = "VPFlyout VPNavBarTranslations translations" data-v-1303e283 data-v-cd7b67e8 data-v-ec8c49bc > < button type = "button" class = "button" aria-haspopup = "true" aria-expanded = "false" aria-label = "Change language" data-v-ec8c49bc > < span class = "text" data-v-ec8c49bc > < span class = "vpi-languages option-icon" data-v-ec8c49bc > < / span > <!-- --> < span class = "vpi-chevron-down text-icon" data-v-ec8c49bc > < / span > < / span > < / button > < div class = "menu" data-v-ec8c49bc > < div class = "VPMenu" data-v-ec8c49bc data-v-9990563e > <!-- --> <!-- [ --> <!-- [ --> < div class = "items" data-v-cd7b67e8 > < p class = "title" data-v-cd7b67e8 > 繁體中文< / p > <!-- [ --> < div class = "VPMenuLink" data-v-cd7b67e8 data-v-79776a7a > < a class = "VPLink link" href = "/api/mp_math/point.html" data-v-79776a7a > <!-- [ --> 简体中文<!-- ] --> < / a > < / div > < div class = "VPMenuLink" data-v-cd7b67e8 data-v-79776a7a > < a class = "VPLink link" href = "/en/api/mp_math/point.html" data-v-79776a7a > <!-- [ --> English<!-- ] --> < / a > < / div > < div class = "VPMenuLink" data-v-cd7b67e8 data-v-79776a7a > < a class = "VPLink link" href = "/ja/api/mp_math/point.html" data-v-79776a7a > <!-- [ --> 日本語<!-- ] --> < / a > < / div > <!-- ] --> < / div > <!-- ] --> <!-- ] --> < / div > < / div > < / div > < div class = "VPNavBarAppearance appearance" data-v-1303e283 data-v-2a6692f8 > < button class = "VPSwitch VPSwitchAppearance" type = "button" role = "switch" title = "Switch to dark theme" aria-checked = "false" data-v-2a6692f8 data-v-3a50aa5c data-v-d82e607b > < span class = "check" data-v-d82e607b > < span class = "icon" data-v-d82e607b > <!-- [ --> < span class = "vpi-sun sun" data-v-3a50aa5c > < / span > < span class = "vpi-moon moon" data-v-3a50aa5c > < / span > <!-- ] --> < / span > < / span > < / button > < / div > < div class = "VPSocialLinks VPNavBarSocialLinks social-links" data-v-1303e283 data-v-f3b91b3a data-v-fa18fe49 > <!-- [ --> < a class = "VPSocialLink no-icon" href = "https://github.com/snowykami/mbcp" aria-label = "github" target = "_blank
2024-08-29 13:25:00 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > 笛卡尔坐标系中的点。< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Args:< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > 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;" > " " " < / 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 >
2024-08-31 06:57:34 +08:00
< span class = "line" > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .z < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > z< / span > < / span > < / code > < / pre > < / div > < / details > < h4 id = "def-approx-self-other-point3-epsilon-float-approx-bool" tabindex = "-1" > < em > < strong > def< / strong > < / em > < code > approx(self, other: Point3, epsilon: float = APPROX) -> bool< / code > < a class = "header-anchor" href = "#def-approx-self-other-point3-epsilon-float-approx-bool" aria-label = "Permalink to "***def*** `approx(self, other: Point3, 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/point.py#L27" target = "_blank" > 於GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > approx< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, other: < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Point3' < / 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 >
2024-08-29 13:25:00 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > 判断两个点是否近似相等。< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Args:< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > 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;" > " " " < / span > < / span >
2024-08-31 06:57:34 +08:00
< 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 > < p > < code > @overload< / code > < / p > < h4 id = "def-self-other-vector3-point3" tabindex = "-1" > < em > < strong > def< / strong > < / em > < code > self + other: Vector3 => Point3< / code > < a class = "header-anchor" href = "#def-self-other-vector3-point3" aria-label = "Permalink to "***def*** `self + other: Vector3 => Point3`"" > < / a > < / h4 > < details > < summary > < b > 源碼< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L43" target = "_blank" > 於GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > @overload< / span > < / span >
2024-08-29 13:25:00 +08:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > __add__< / 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;" > ' Point3' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
2024-08-31 06:57:34 +08:00
< span class = "line" > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > ...< / span > < / span > < / code > < / pre > < / div > < / details > < p > < code > @overload< / code > < / p > < h4 id = "def-self-other-point3-point3" tabindex = "-1" > < em > < strong > def< / strong > < / em > < code > self + other: Point3 => Point3< / code > < a class = "header-anchor" href = "#def-self-other-point3-point3" aria-label = "Permalink to "***def*** `self + other: Point3 => Point3`"" > < / a > < / h4 > < details > < summary > < b > 源碼< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L47" target = "_blank" > 於GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > @overload< / span > < / span >
2024-08-29 13:25:00 +08:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > __add__< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, other: < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Point3' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) -> < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Point3' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
2024-08-31 06:57:34 +08:00
< span class = "line" > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > ...< / span > < / span > < / code > < / pre > < / div > < / details > < h4 id = "def-self-other" tabindex = "-1" > < em > < strong > def< / strong > < / em > < code > self + other< / code > < a class = "header-anchor" href = "#def-self-other" aria-label = "Permalink to "***def*** `self + other`"" > < / a > < / h4 > < p > < strong > 説明< / strong > : P + V -> P P + P -> P< / p > < p > < strong > 變數説明< / strong > :< / p > < blockquote > < ul > < li > other:< / li > < / ul > < / blockquote > < details > < summary > < b > 源碼< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L50" target = "_blank" > 於GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > __add__< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, other):< / span > < / span >
2024-08-29 13:25:00 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > P + V -> P< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > P + P -> 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;" > " " " < / span > < / span >
2024-08-31 06:57:34 +08:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > Point3(< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .x < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > +< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other.x, < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .y < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > +< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other.y, < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .z < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > +< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other.z)< / span > < / span > < / code > < / pre > < / div > < / details > < h4 id = "def-eq-self-other" tabindex = "-1" > < em > < strong > def< / strong > < / em > < code > __eq__(self, other)< / code > < a class = "header-anchor" href = "#def-eq-self-other" aria-label = "Permalink to "***def*** `__eq__(self, other)`"" > < / a > < / h4 > < p > < strong > 説明< / strong > : 判断两个点是否相等。< / p > < p > < strong > 變數説明< / strong > :< / p > < blockquote > < ul > < li > other:< / li > < / ul > < / blockquote > < details > < summary > < b > 源碼< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L60" target = "_blank" > 於GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light 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 >
2024-08-29 13:25:00 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > 判断两个点是否相等。< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Args:< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > 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;" > " " " < / span > < / span >
2024-08-31 06:57:34 +08:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > approx(< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .x, other.x) < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > and< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > approx(< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .y, other.y) < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > and< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > approx(< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .z, other.z)< / span > < / span > < / code > < / pre > < / div > < / details > < h4 id = "def-self-other-point3-vector3" tabindex = "-1" > < em > < strong > def< / strong > < / em > < code > self - other: Point3 => Vector3< / code > < a class = "header-anchor" href = "#def-self-other-point3-vector3" aria-label = "Permalink to "***def*** `self - other: Point3 => Vector3`"" > < / a > < / h4 > < p > < strong > 説明< / strong > : P - P -> V< / p > < p > P - V -> P 已在 :class:< code > Vector3< / code > 中实现< / p > < p > < strong > 變數説明< / strong > :< / p > < blockquote > < ul > < li > other:< / li > < / ul > < / blockquote > < details > < summary > < b > 源碼< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/point.py#L69" target = "_blank" > 於GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light 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;" > ' Point3' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) -> < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Vector3' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
2024-08-29 13:25:00 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > P - P -> V< / span > < / span >
< span class = "line" > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > P - V -> 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;" > " " " < / 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 >
2024-08-31 07:55:26 +08:00
< 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-40342069 data-v-a4b38bd6 > <!-- [ --> <!-- ] --> < div class = "edit-info" data-v-a4b38bd6 > <!-- --> < div class = "last-updated" data-v-a4b38bd6 > < p class = "VPLastUpdated" data-v-a4b38bd6 data-v-5cebc0fc > Last updated: < time datetime = "2024-08-29T07:07:35.000Z" data-v-5cebc0fc > < / time > < / p > < / div > < / div > < nav class = "prev-next" aria-labelledby = "doc-footer-aria-label" data-v-a4b38bd6 > < span class = "visually-hidden" id = "doc-footer-aria-label" data-v-a4b38bd6 > Pager< / span > < div class = "pager" data-v-a4b38bd6 > < a class = "VPLink link pager-link prev" href = "/zht/api/mp_math/plane.html" data-v-a4b38bd6 > <!-- [ --> < span class = "desc" data-v-a4b38bd6 > 上一頁< / span > < span class = "title" data-v-a4b38bd6 > mbcp.mp_math.plane< / span > <!-- ] --> < / a > < / div > < div class = "pager" data-v-a4b38bd6 > < a class = "VPLink link pager-link next" href = "/zht/api/mp_math/segment.html" data-v-a4b38bd6 > <!-- [ --> < span class = "desc" data-v-a4b38bd6 > 下一頁< / span > < span class = "title" data-v-a4b38bd6 > mbcp.mp_math.segment< / span > <!-- ] --> < / a > < / div > < / nav > < / footer > <!-- [ --> <!-- ] --> < / div > < / div > < / div > <!-- [ --> <!-- ] --> < / div > < / div > < footer class = "VPFooter has-sidebar" data-v-22f859ac data-v-e3ca6860 > < div class = "container" data-v-e3ca6860 > < p class = "message" data-v-e3ca6860 > 文檔由 < a href = "https://vitepress.dev/" > VitePress< / a > 構建 | API引用由 < a href = "https://github.com/LiteyukiStudio/litedoc" > litedoc< / a > 生成< / p > < p class = "copyright" data-v-e3ca6860 > Copyright (C) 2020-2024 SnowyKami. All Rights Reserved< / p > < / div > < / footer > <!-- [ --> <!-- ] --> < / div > < / div >
< script > w i n d o w . _ _ V P _ H A S H _ M A P _ _ = J S O N . p a r s e ( " { \ " a p i _ a p i . m d \ " : \ " C M v A M n 4 b \ " , \ " a p i _ i n d e x . m d \ " : \ " B Y C W C W D w \ " , \ " a p i _ m p _ m a t h _ a n g l e . m d \ " : \ " Z H Q L V Z i 6 \ " , \ " a p i _ m p _ m a t h _ c o n s t . m d \ " : \ " D P f W D l O C \ " , \ " a p i _ m p _ m a t h _ e q u a t i o n . m d \ " : \ " D N L 3 R h R T \ " , \ " a p i _ m p _ m a t h _ f u n c t i o n . m d \ " : \ " l F d 1 g u d y \ " , \ " a p i _ m p _ m a t h _ i n d e x . m d \ " : \ " C B a W j 2 T G \ " , \ " a p i _ m p _ m a t h _ l i n e . m d \ " : \ " D j f Q - B 5 i \ " , \ " a p i _ m p _ m a t h _ m p _ m a t h . m d \ " : \ " C p Q n g d P n \ " , \ " a p i _ m p _ m a t h _ m p _ m a t h _ t y p i n g . m d \ " : \ " u e X w U e 7 x \ " , \ " a p i _ m p _ m a t h _ p l a n e . m d \ " : \ " C X p U 2 f 7 r \ " , \ " a p i _ m p _ m a t h _ p o i n t . m d \ " : \ " J b Q s _ F q s \ " , \ " a p i _ m p _ m a t h _ s e g m e n t . m d \ " : \ " B k j s i F Z K \ " , \ " a p i _ m p _ m a t h _ u t i l s . m d \ " : \ " C - G f - q 7 v \ " , \ " a p i _ m p _ m a t h _ v e c t o r . m d \ " : \ " B m e q j m - R \ " , \ " a p i _ p a r t i c l e _ i n d e x . m d \ " : \ " e l M k n 6 t v \ " , \ " a p i _ p a r t i c l e _ p a r t i c l e . m d \ " : \ " j e i n d v 3 k \ " , \ " a p i _ p r e s e t s _ i n d e x . m d \ " : \ " D A n s 7 u V y \ " , \ " a p i _ p r e s e t s _ m o d e l _ i n d e x . m d \ " : \ " B V 3 c g l v I \ " , \ " a p i _ p r e s e t s _ m o d e l _ m o d e l . m d \ " : \ " C k T 5 A 2 V x \ " , \ " a p i _ p r e s e t s _ p r e s e t s . m d \ " : \ " D K v f M d j r \ " , \ " d e m o _ i n d e x . m d \ " : \ " C V A d l a F I \ " , \ " e n _ a p i _ a p i . m d \ " : \ " D N V 4 3 N d 2 \ " , \ " e n _ a p i _ i n d e x . m d \ " : \ " r I v J - t I - \ " , \ " e n _ a p i _ m p _ m a t h _ a n g l e . m d \ " : \ " B W p D h X E 0 \ " , \ " e n _ a p i _ m p _ m a t h _ c o n s t . m d \ " : \ " C 7 R P r 8 Y w \ " , \ " e n _ a p i _ m p _ m a t h _ e q u a t i o n . m d \ " : \ " Q 3 e d A l T b \ " , \ " e n _ a p i _ m p _ m a t h _ f u n c t i o n . m d \ " : \ " s T y Z Q 9 K p \ " , \ " e n _ a p i _ m p _ m a t h _ i n d e x . m d \ " : \ " D R j W G 5 h d \ " , \ " e n _ a p i _ m p _ m a t h _ l i n e . m d \ " : \ " B e v e A f E c \ " , \ " e n _ a p i _ m p _ m a t h _ m p _ m a t h . m d \ " : \ " B g 5 e F I M k \ " , \ " e n _ a p i _ m p _ m a t h _ m p _ m a t h _ t y p i n g . m d \ " : \ " B y 9 a l 4 4 H \ " , \ " e n _ a p i _ m p _ m a t h _ p l a n e . m d \ " : \ " D S 5 O U S g Q \ " , \ " e n _ a p i _ m p _ m a t h _ p o i n t . m d \ " : \ " m I U s 1 I A B \ " , \ " e n _ a p i _ m p _ m a t h _ s e g m e n t . m d \ " : \ " l 3 K D D W f s \ " , \ " e n _ a p i _ m p _ m a t h _ u t i l s . m d \ " : \ " B r P H v G Z 2 \ " , \ " e n _ a p i _ m p _ m a t h _ v e c t o r . m d \ " : \ " B k O b 6 w 9 W \ " , \ " e n _ a p i _ p a r t i c l e _ i n d e x . m d \ " : \ " L U 1 i J 7 C h \ " , \ " e n _ a p i _ p a r t i c l e _ p a r t i c l e . m d \ " : \ " B F O r 8 q j E \ " , \ " e n _ a p i _ p r e s e t s _ i n d e x . m d \ " : \ " B r Q 3 P k 9 2 \ " , \ " e n _ a p i _ p r e s e t s _ m o d e l _ i n d e x . m d \ " : \ " D - C 7 z M 8 U \ " , \ " e n _ a p i _ p r e s e t s _ m o d e l _ m o d e l . m d \ " : \ " D a W J c W m r \ " , \ " e n _ a p i _ p r e s e t s _ p r e s e t s . m d \ " : \ " O K z O d e y i \ " , \ " e n _ g u i d e _ i n d e x . m d \ " : \ " C 3 k I 8 f 8 A \ " , \ " e n _ i n d e x . m d \ " : \ " D 5 C d d O W - \ " , \ " e n _ r e f e r _ i n d e x . m d \ " : \ " C q 6 G W i 0 V \ " , \ " g u i d e _ i n d e x . m d \ " : \ " B V h Q 0 k P y \ " , \ " i n d e x . m d \ " : \ " D J W B R k U z \ " , \ " j a _ a p i _ a p i . m d \ " : \ " a s J Z C X i e \ " , \ " j a _ a p i _ i n d e x . m d \ " : \ " B k N - p Z - z \ " , \ " j a _ a p i _ m p _ m a t h _ a n g l e . m d \ " : \ " Q 4 K O k l 4 D \ " , \ " j a _ a p i _ m p _ m a t h _ c o n s t . m d \ " : \ " q n e r s N f K \ " , \ " j a _ a p i _ m p _ m a t h _ e q u a t i o n . m d \ " : \ " C r 5 p O v e T \ " , \ " j a _ a p i _ m p _ m a t h _ f u n c t i o n . m d \ " : \ " x y b s 8 K o c \ " , \ " j a _ a p i _ m p _ m a t h _ i n d e x . m d \ " : \ " C R j x 8 T k H \ " , \ " j a _ a p i _ m p _ m a t h _ l i n e . m d \ " : \ " B 0 6 T Z x O j \ " , \ " j a _ a p i _ m p _ m a t h _ m p _ m a t h . m d \ " : \ " B B R k f U b W \ " , \ " j a _ a p i _ m p _ m a t h _ m p _ m a t h _ t y p i n g . m d \ " : \ " B 4 8 J O b 2 8 \ " , \ " j a _ a p i _ m p _ m a t h _ p l a n e . m d \ " : \ " B s I 6 A c c W \ " , \ " j a _ a p i _ m p _ m a t h _ p o i n t . m d \ " : \ " B a R a B 4 F 7 \ " , \ " j a _ a p i _ m p _ m a t h _ s e g m e n t . m d \ " : \ " S G T K z H C - \ " , \ " j a _ a p i _ m p _ m a t h _ u t i l s . m d \ " : \ " B 0 A u G U a q \ " , \ " j a _ a p i _ m p _ m a t h _ v e c t o r . m d \ " : \ " Z V 6 g 6 C q y \ " , \ " j a _ a p i _ p a r t i c l e _ i n d e x . m d \ " : \ " l Q M 7 6 p h s \ " , \ " j a _ a p i _ p a r t i c l e _ p a r t i c l e . m d \ " : \ " B l Q t 6 - 7 L \ " , \ " j a _ a p i _ p r e s e t s _ i n d e x . m d \ " : \ " b R V 3 3 r r M \ " , \ " j a _ a p i _ p r e s e t s _ m o d e l _ i n d e x . m d \ " : \ " C U 3 t c R O p \ " , \ " j a _ a p i _ p r e s e t s _ m o d e l _ m o d e l . m d \ " : \ " C a 8 3 7 h 0 t \ " , \ " j a _ a p i _ p r e s e t s _ p r e s e t s . m d \ " : \ " B 4 N I H C 5 7 \ " , \ " j a _ g u i d e _ i n d e x . m d \ " : \ " w 1 T f 2 A d m \ " , \ " j a _ i n d e x . m d \ " : \ " D n s q Z i 7 i \ " , \ " j a _ r e f e r _ i n d e x . m d \ " : \ " D a m U s c s 8 \ " , \ " r e f e r _ f u n c t i o n _ c u r r y . m d \ " : \ " D _ o q R D d 3 \ " , \ " r e f e r _ f u n c t i o n _ f u n c t i o n . m d \ " : \ " B i _ 8 2 l I J \ " , \ " r e f e r _ i n d e x . m d \ " : \ " y F Z W 0 k I 4 \ " , \ " z h t _ a p i _ a p i . m d \ " : \ " D i H U k C Y v \ " , \ " z h t _ a p i _ i n d e x . m d \ " : \ " B E o H S 6 e Y \ " , \ " z h t _ a p i _ m p _ m a t h _ a n g l e . m d \ " : \ " C U X s 1 f 3 L \ " , \ " z h t _ a p i _ m p _ m a t h _ c o n s t . m d \ " : \ " B R b O g - i k \ " , \ " z h t _ a p i _ m p _ m a t h _ e q u a t i o n . m d \ " : \ " D k F 2 3 w Z v \ " , \ " z h t _ a p i _ m p _ m a t h _ f u n c t i o n . m d \ " : \ " H x 5 F v 7 y g \ " , \ " z h t _ a p i _ m p _ m a t h _ i n d e x . m d \ " : \ " d k T u U 5 S c \ " , \ " z h t _ a p i _ m p _ m a t h _ l i n e . m d \ " : \ " C h B w W N 5 h \ " , \ " z h t _ a p i _ m p _ m a t h _ m p _ m a t h . m d \ " : \ " C 2 f K j 2 U - \ " , \ " z h t _ a p i _ m p _ m a t h _ m p _ m a t h _ t y p i n g . m d \ " : \ " D R n E B E 4 1 \ " , \ " z h t _ a p i _ m p _ m a t h _ p l a n e . m d \ " : \ " C s q Z z 8 A P \ " , \ " z h t _ a p i _ m p _ m a t h _ p o i n t . m d \ " : \ " D d P n y 4 E p \ " , \ " z h t _ a p i _ m p _ m a t h _ s e g m e n t . m d \ " : \ " C G l D P y I d \ " , \ " z h t _ a p i _ m p _ m a t h _ u t i l s . m d \ " : \ " q R r y p Z k K \ " , \ " z h t _ a p i _ m p _ m a t h _ v e c t o r . m d \ " : \ " B g u y f Q 9 I \ " , \ " z h t _ a p i _ p a r t i c l e _ i n d e x . m d \ " : \ " C 3 u v y f W b \ " , \ " z h t _ a p i _ p a r t i c l e _ p a r t i c l e . m d \ " : \ " B V p 5 w R X c \ " , \ " z h t _ a p i _ p r e s e t s _ i n d e x . m d \ " : \ " D 5 b U O R c 4 \ " , \ " z h t _ a p i _ p r e s e t s _ m o d e l _ i n d e x . m d \ " : \ " B A B Y o P v x \ " , \ " z h t _ a p i _ p r e s e t s _ m o d e l _ m o d e l . m d \ " : \ " D 7 U O T u j b \ " , \ " z h t _ a p i _ p r e s e t s _ p r e s e t s . m d \ " : \ " C R L 6 J o 8 B \ " , \ " z h t _ g u i d e _ i n d e x . m d \ " : \ " B N n M V i C 8 \ " , \ " z h t _ i n d e x . m d \ " : \ " C U R 8 - Q X m \ " , \ " z h t _ r e f e r _ i n d e x . m d \ " : \ " B 7 C Q S 2 U W \ " } " ) ; f u n c t i o n d e s e r i a l i z e F u n c t i o n s ( r ) { r e t u r n A r r a y . i s A r r a y ( r )
2024-08-29 13:25:00 +08:00
< / body >
< / html >