2024-08-28 12:03:02 +08:00
<!DOCTYPE html>
< html lang = "zh-Hans" 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-28 12:03:02 +08:00
< meta name = "generator" content = "VitePress v1.3.4" >
2024-08-31 07:40:42 +08:00
< link rel = "preload stylesheet" href = "/assets/style.DnAlSDDf.css" as = "style" >
2024-08-28 12:03:02 +08:00
2024-08-30 13:46:30 +08:00
< script type = "module" src = "/assets/app.DSCSdM_3.js" > < / script >
< link rel = "modulepreload" href = "/assets/chunks/theme.CIS5wKR_.js" >
< link rel = "modulepreload" href = "/assets/chunks/framework.C94oF1kp.js" >
2024-08-31 06:57:34 +08:00
< link rel = "modulepreload" href = "/assets/api_mp_math_point.md.BY0HIcUa.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-28 12:03:02 +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 06:57:34 +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 = "/" 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 > < 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 = "/guide/" tabindex = "0" data-v-0fb289c1 data-v-ad4a8b64 > <!-- [ --> < span data-v-ad4a8b64 > 快速开始< / span > <!-- ] --> < / a > <!-- ] --> <!-- [ --> < a class = "VPLink link VPNavBarMenuLink" href = "/refer.html" tabindex = "0" data-v-0fb289c1 data-v-ad4a8b64 > <!-- [ --> < span data-v-ad4a8b64 > 参考< / span > <!-- ] --> < / a > <!-- ] --> <!-- [ --> < a class = "VPLink link VPNavBarMenuLink" href = "/api/" tabindex = "0" data-v-0fb289c1 data-v-ad4a8b64 > <!-- [ --> < span data-v-ad4a8b64 > API引用< / span > <!-- ] --> < / a > <!-- ] --> <!-- [ --> < a class = "VPLink link VPNavBarMenuLink" href = "/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 = "/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 class = "VPMenuLink" data-v-cd7b67e8 data-v-79776a7a > < a class = "VPLink link" href = "/zht/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" rel = "noopener" data-v-fa18fe49 data-v-b0526bd7 > < span class = "vpi-social-github" / > < / a > <!-- ] --> < / div > < div class = "VPFlyout VPNavBarExtra extra" data-v-1303e283 data-v-2fc967b6 data-v-ec8c49bc > < button type = "button" class = "button" aria-haspopup = "true" aria-expanded = "false" aria-label = "extra navigation" data-v-ec8c49bc > < span class = "vpi-more-horizontal icon" data-v-ec8c49bc > < / span > < / button > < div class = "menu" data-v-ec8c49bc > < div class = "V
2024-08-28 12:03:02 +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-28 12:03:02 +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-28 20:35:22 +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-28 20:35:22 +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-28 20:35:22 +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-28 20:35:22 +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-28 21:28:34 +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 06:08:36 +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 > <!-- [ --> <!-- ] --> <!-- --> < 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 = "/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 = "/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 >
2024-08-31 07:40:42 +08:00
< 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 \ " : \ " D _ B 0 H l c p \ " , \ " a p i _ i n d e x . m d \ " : \ " C _ w E S r r Y \ " , \ " a p i _ m p _ m a t h _ a n g l e . m d \ " : \ " C - N 7 3 C g T \ " , \ " a p i _ m p _ m a t h _ c o n s t . m d \ " : \ " B A f 8 m K 4 W \ " , \ " a p i _ m p _ m a t h _ e q u a t i o n . m d \ " : \ " C p 3 1 U S q a \ " , \ " a p i _ m p _ m a t h _ f u n c t i o n . m d \ " : \ " D I C 1 R y 3 F \ " , \ " a p i _ m p _ m a t h _ i n d e x . m d \ " : \ " B N f 7 b Q q L \ " , \ " a p i _ m p _ m a t h _ l i n e . m d \ " : \ " C t D 6 l W P K \ " , \ " a p i _ m p _ m a t h _ m p _ m a t h . m d \ " : \ " G l F M k W i Q \ " , \ " a p i _ m p _ m a t h _ m p _ m a t h _ t y p i n g . m d \ " : \ " D l n J m k o s \ " , \ " a p i _ m p _ m a t h _ p l a n e . m d \ " : \ " a d 6 d o a t t \ " , \ " a p i _ m p _ m a t h _ p o i n t . m d \ " : \ " B Y 0 H I c U a \ " , \ " a p i _ m p _ m a t h _ s e g m e n t . m d \ " : \ " C m G 5 S W C e \ " , \ " a p i _ m p _ m a t h _ u t i l s . m d \ " : \ " C A I 5 j z a B \ " , \ " a p i _ m p _ m a t h _ v e c t o r . m d \ " : \ " B n K f t 0 9 t \ " , \ " a p i _ p a r t i c l e _ i n d e x . m d \ " : \ " C m 3 V k - e s \ " , \ " a p i _ p a r t i c l e _ p a r t i c l e . m d \ " : \ " y D 6 t c N S r \ " , \ " a p i _ p r e s e t s _ i n d e x . m d \ " : \ " C D 6 2 I 2 g v \ " , \ " a p i _ p r e s e t s _ m o d e l _ i n d e x . m d \ " : \ " C x T d Q o z Z \ " , \ " a p i _ p r e s e t s _ m o d e l _ m o d e l . m d \ " : \ " C 5 h m c I x j \ " , \ " a p i _ p r e s e t s _ p r e s e t s . m d \ " : \ " 4 R 0 V R b Q o \ " , \ " d e m o _ i n d e x . m d \ " : \ " D - H 9 z R U E \ " , \ " e n _ a p i _ a p i . m d \ " : \ " B S g r C X 1 d \ " , \ " e n _ a p i _ i n d e x . m d \ " : \ " D j _ 5 n F T t \ " , \ " e n _ a p i _ m p _ m a t h _ a n g l e . m d \ " : \ " D g b 5 q A 7 e \ " , \ " e n _ a p i _ m p _ m a t h _ c o n s t . m d \ " : \ " g G p X U S h q \ " , \ " e n _ a p i _ m p _ m a t h _ e q u a t i o n . m d \ " : \ " B N T h 5 S 3 G \ " , \ " e n _ a p i _ m p _ m a t h _ f u n c t i o n . m d \ " : \ " C K b X J N V H \ " , \ " e n _ a p i _ m p _ m a t h _ i n d e x . m d \ " : \ " B E j L B M p H \ " , \ " e n _ a p i _ m p _ m a t h _ l i n e . m d \ " : \ " B k G v f N B 7 \ " , \ " e n _ a p i _ m p _ m a t h _ m p _ m a t h . m d \ " : \ " D 6 i h Y P a v \ " , \ " 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 \ " : \ " D n l 2 a J Q 4 \ " , \ " e n _ a p i _ m p _ m a t h _ p l a n e . m d \ " : \ " I O 0 B o e q k \ " , \ " e n _ a p i _ m p _ m a t h _ p o i n t . m d \ " : \ " B f L B 2 P o v \ " , \ " e n _ a p i _ m p _ m a t h _ s e g m e n t . m d \ " : \ " 4 U l H 6 a D - \ " , \ " e n _ a p i _ m p _ m a t h _ u t i l s . m d \ " : \ " a 8 V z n 8 _ _ \ " , \ " e n _ a p i _ m p _ m a t h _ v e c t o r . m d \ " : \ " C G 9 J b G 4 z \ " , \ " e n _ a p i _ p a r t i c l e _ i n d e x . m d \ " : \ " B f y N Q i R g \ " , \ " e n _ a p i _ p a r t i c l e _ p a r t i c l e . m d \ " : \ " B N k f E y J n \ " , \ " e n _ a p i _ p r e s e t s _ i n d e x . m d \ " : \ " B W b 2 f p T g \ " , \ " 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 I d Y h 3 v o \ " , \ " 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 p 2 7 P G g h \ " , \ " e n _ a p i _ p r e s e t s _ p r e s e t s . m d \ " : \ " C C U z s Y o g \ " , \ " e n _ g u i d e _ i n d e x . m d \ " : \ " D r D H T Y C Z \ " , \ " e n _ i n d e x . m d \ " : \ " B S T S O H 3 9 \ " , \ " e n _ r e f e r _ i n d e x . m d \ " : \ " a l w 4 L - b p \ " , \ " g u i d e _ i n d e x . m d \ " : \ " C f m z k 2 I H \ " , \ " i n d e x . m d \ " : \ " C N F 8 L J a 0 \ " , \ " j a _ a p i _ a p i . m d \ " : \ " C P z 5 8 q I w \ " , \ " j a _ a p i _ i n d e x . m d \ " : \ " C n U e u i f x \ " , \ " j a _ a p i _ m p _ m a t h _ a n g l e . m d \ " : \ " R 6 4 H 2 - o b \ " , \ " j a _ a p i _ m p _ m a t h _ c o n s t . m d \ " : \ " D G X A g D f n \ " , \ " j a _ a p i _ m p _ m a t h _ e q u a t i o n . m d \ " : \ " b B b n L v e W \ " , \ " j a _ a p i _ m p _ m a t h _ f u n c t i o n . m d \ " : \ " K S 5 0 D w Z u \ " , \ " j a _ a p i _ m p _ m a t h _ i n d e x . m d \ " : \ " C T Z Z - p 9 Z \ " , \ " j a _ a p i _ m p _ m a t h _ l i n e . m d \ " : \ " B 3 o N f I k I \ " , \ " j a _ a p i _ m p _ m a t h _ m p _ m a t h . m d \ " : \ " D - p r C 0 U O \ " , \ " 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 N y m g r C T \ " , \ " j a _ a p i _ m p _ m a t h _ p l a n e . m d \ " : \ " D F K Y h l 6 m \ " , \ " j a _ a p i _ m p _ m a t h _ p o i n t . m d \ " : \ " C Q I f Q e l y \ " , \ " j a _ a p i _ m p _ m a t h _ s e g m e n t . m d \ " : \ " y 5 H J _ C q z \ " , \ " j a _ a p i _ m p _ m a t h _ u t i l s . m d \ " : \ " R N F M o 8 b K \ " , \ " j a _ a p i _ m p _ m a t h _ v e c t o r . m d \ " : \ " N R H _ z 6 H a \ " , \ " j a _ a p i _ p a r t i c l e _ i n d e x . m d \ " : \ " J r 4 1 Y 3 T S \ " , \ " j a _ a p i _ p a r t i c l e _ p a r t i c l e . m d \ " : \ " e x T t 4 6 p q \ " , \ " j a _ a p i _ p r e s e t s _ i n d e x . m d \ " : \ " C Q q d Q b I Z \ " , \ " 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 b D n h 2 b \ " , \ " j a _ a p i _ p r e s e t s _ m o d e l _ m o d e l . m d \ " : \ " D q x l 5 N O T \ " , \ " j a _ a p i _ p r e s e t s _ p r e s e t s . m d \ " : \ " D w z X d D q R \ " , \ " j a _ g u i d e _ i n d e x . m d \ " : \ " B x G n Z Y w R \ " , \ " j a _ i n d e x . m d \ " : \ " D C W i T E N z \ " , \ " j a _ r e f e r _ i n d e x . m d \ " : \ " C O D W 6 i M X \ " , \ " r e f e r _ f u n c t i o n _ c u r r y . m d \ " : \ " D w K Z a w p 5 \ " , \ " r e f e r _ f u n c t i o n _ f u n c t i o n . m d \ " : \ " D 3 I g f Z X 2 \ " , \ " r e f e r _ i n d e x . m d \ " : \ " C c z Y T l 3 j \ " , \ " z h t _ a p i _ a p i . m d \ " : \ " D y U S H A 0 S \ " , \ " z h t _ a p i _ i n d e x . m d \ " : \ " C g Z H 6 a H Q \ " , \ " z h t _ a p i _ m p _ m a t h _ a n g l e . m d \ " : \ " U U c 3 s 3 K L \ " , \ " z h t _ a p i _ m p _ m a t h _ c o n s t . m d \ " : \ " x w Q v u Y c 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 Z N M C 3 t \ " , \ " z h t _ a p i _ m p _ m a t h _ f u n c t i o n . m d \ " : \ " C Y w I 6 A 0 a \ " , \ " z h t _ a p i _ m p _ m a t h _ i n d e x . m d \ " : \ " m m e M M r i u \ " , \ " z h t _ a p i _ m p _ m a t h _ l i n e . m d \ " : \ " B y O R X A G U \ " , \ " z h t _ a p i _ m p _ m a t h _ m p _ m a t h . m d \ " : \ " C 3 0 2 r x K c \ " , \ " 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 \ " : \ " C N i S n u M w \ " , \ " z h t _ a p i _ m p _ m a t h _ p l a n e . m d \ " : \ " D L 8 P M Q 0 1 \ " , \ " z h t _ a p i _ m p _ m a t h _ p o i n t . m d \ " : \ " F C f 8 N 9 t u \ " , \ " z h t _ a p i _ m p _ m a t h _ s e g m e n t . m d \ " : \ " B 6 2 s P C - 7 \ " , \ " z h t _ a p i _ m p _ m a t h _ u t i l s . m d \ " : \ " e s 0 X y X O 5 \ " , \ " z h t _ a p i _ m p _ m a t h _ v e c t o r . m d \ " : \ " 8 h z E A 9 L V \ " , \ " z h t _ a p i _ p a r t i c l e _ i n d e x . m d \ " : \ " 8 G a G B 1 u l \ " , \ " z h t _ a p i _ p a r t i c l e _ p a r t i c l e . m d \ " : \ " h u u R T E b 9 \ " , \ " z h t _ a p i _ p r e s e t s _ i n d e x . m d \ " : \ " D v O V i S o x \ " , \ " 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 \ " : \ " C 7 Q k A D _ l \ " , \ " 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 \ " : \ " a G d p V m b K \ " , \ " z h t _ a p i _ p r e s e t s _ p r e s e t s . m d \ " : \ " C s D H j R b K \ " , \ " z h t _ g u i d e _ i n d e x . m d \ " : \ " C s u F V F x u \ " , \ " z h t _ i n d e x . m d \ " : \ " V M j J 0 l p j \ " , \ " z h t _ r e f e r _ i n d e x . m d \ " : \ " B z 6 v o x E Q \ " } " ) ; 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-28 12:03:02 +08:00
< / body >
< / html >