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.vector | MBCP 文档< / title >
< meta name = "description" content = "MBCP 粒子计算和生成库文档" >
2024-08-28 12:03:02 +08:00
< meta name = "generator" content = "VitePress v1.3.4" >
2024-09-05 16:13:33 +08:00
< link rel = "preload stylesheet" href = "/assets/style.Bh0M9mVm.css" as = "style" >
2024-08-28 12:03:02 +08:00
2024-09-05 16:13:33 +08:00
< script type = "module" src = "/assets/app.DM0bI7a8.js" > < / script >
< link rel = "modulepreload" href = "/assets/chunks/theme.CvV0lUYF.js" >
2024-08-31 07:55:26 +08:00
< link rel = "modulepreload" href = "/assets/chunks/framework.DpC1ZpOZ.js" >
2024-09-04 19:22:16 +08:00
< link rel = "modulepreload" href = "/assets/api_mp_math_vector.md.B1Wu6c9G.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-09-04 19:22:16 +08:00
< div id = "app" > < div class = "Layout" data-v-3b4648ff > <!-- [ --> <!-- ] --> <!-- [ --> < span tabindex = "-1" data-v-e813112c > < / span > < a href = "#VPContent" class = "VPSkipLink visually-hidden" data-v-e813112c > Skip to content < / a > <!-- ] --> <!-- --> < header class = "VPNav" data-v-3b4648ff data-v-e823d444 > < div class = "VPNavBar has-sidebar top" data-v-e823d444 data-v-da0688be > < div class = "wrapper" data-v-da0688be > < div class = "container" data-v-da0688be > < div class = "title" data-v-da0688be > < div class = "VPNavBarTitle has-sidebar" data-v-da0688be data-v-606a7e0f > < a class = "title" href = "/" data-v-606a7e0f > <!-- [ --> <!-- ] --> <!-- [ --> < img class = "VPImage logo" src = "/mbcp-logo.svg" alt data-v-cc63e071 > <!-- ] --> < span data-v-606a7e0f > MBCP 文档< / span > <!-- [ --> <!-- ] --> < / a > < / div > < / div > < div class = "content" data-v-da0688be > < div class = "content-body" data-v-da0688be > <!-- [ --> <!-- ] --> < div class = "VPNavBarSearch search" data-v-da0688be > <!-- [ --> <!-- --> < 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-da0688be data-v-bf53b681 > < span id = "main-nav-aria-label" class = "visually-hidden" data-v-bf53b681 > Main Navigation < / span > <!-- [ --> <!-- [ --> < a class = "VPLink link VPNavBarMenuLink" href = "/guide/" tabindex = "0" data-v-bf53b681 data-v-9a0da802 > <!-- [ --> < span data-v-9a0da802 > 快速开始< / span > <!-- ] --> < / a > <!-- ] --> <!-- [ --> < a class = "VPLink link VPNavBarMenuLink" href = "/refer.html" tabindex = "0" data-v-bf53b681 data-v-9a0da802 > <!-- [ --> < span data-v-9a0da802 > 参考< / span > <!-- ] --> < / a > <!-- ] --> <!-- [ --> < a class = "VPLink link VPNavBarMenuLink" href = "/api/" tabindex = "0" data-v-bf53b681 data-v-9a0da802 > <!-- [ --> < span data-v-9a0da802 > API引用< / span > <!-- ] --> < / a > <!-- ] --> <!-- [ --> < a class = "VPLink link VPNavBarMenuLink" href = "/demo/" tabindex = "0" data-v-bf53b681 data-v-9a0da802 > <!-- [ --> < span data-v-9a0da802 > 实例< / span > <!-- ] --> < / a > <!-- ] --> <!-- ] --> < / nav > < div class = "VPFlyout VPNavBarTranslations translations" data-v-da0688be data-v-912817b1 data-v-00660109 > < button type = "button" class = "button" aria-haspopup = "true" aria-expanded = "false" aria-label = "Change language" data-v-00660109 > < span class = "text" data-v-00660109 > < span class = "vpi-languages option-icon" data-v-00660109 > < / span > <!-- --> < span class = "vpi-chevron-down text-icon" data-v-00660109 > < / span > < / span > < / button > < div class = "menu" data-v-00660109 > < div class = "VPMenu" data-v-00660109 data-v-809b8af7 > <!-- --> <!-- [ --> <!-- [ --> < div class = "items" data-v-912817b1 > < p class = "title" data-v-912817b1 > 简体中文< / p > <!-- [ --> < div class = "VPMenuLink" data-v-912817b1 data-v-25a54821 > < a class = "VPLink link" href = "/en/api/mp_math/vector.html" data-v-25a54821 > <!-- [ --> English<!-- ] --> < / a > < / div > < div class = "VPMenuLink" data-v-912817b1 data-v-25a54821 > < a class = "VPLink link" href = "/ja/api/mp_math/vector.html" data-v-25a54821 > <!-- [ --> 日本語<!-- ] --> < / a > < / div > < div class = "VPMenuLink" data-v-912817b1 data-v-25a54821 > < a class = "VPLink link" href = "/zht/api/mp_math/vector.html" data-v-25a54821 > <!-- [ --> 繁體中文<!-- ] --> < / a > < / div > <!-- ] --> < / div > <!-- ] --> <!-- ] --> < / div > < / div > < / div > < div class = "VPNavBarAppearance appearance" data-v-da0688be data-v-864d2abc > < button class = "VPSwitch VPSwitchAppearance" type = "button" role = "switch" title = "Switch to dark theme" aria-checked = "false" data-v-864d2abc data-v-3125216b data-v-846fe538 > < span class = "check" data-v-846fe538 > < span class = "icon" data-v-846fe538 > <!-- [ --> < span class = "vpi-sun sun" data-v-3125216b > < / span > < span class = "vpi-moon moon" data-v-3125216b > < / span > <!-- ] --> < / span > < / span > < / button > < / div > < div class = "VPSocialLinks VPNavBarSocialLinks social-links" data-v-da0688be data-v-2c606308 data-v-100434c4 > <!-- [ --> < a class = "VPSocialLink no-icon" href = "https://github.com/snowykami/mbcp" aria-label = "github" target = "_blank" rel = "
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;" > 3维向量< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Args:< / span > < / span >
2024-08-31 09:41:17 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > x ([`float`](https%3A//docs.python.org/3/library/functions.html#float)): x轴分量< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > y (`float`): y轴分量< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > z (`float`): z轴分量< / 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:#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-09-03 22:49:39 +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 = "method-approx-self-other-vector3-epsilon-float-approx-bool" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > approx(self, other: Vector3, epsilon: float = APPROX) -> bool< / code > < a class = "header-anchor" href = "#method-approx-self-other-vector3-epsilon-float-approx-bool" aria-label = "Permalink to "***method*** `approx(self, other: Vector3, epsilon: float = APPROX) -> bool`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : 判断两个向量是否近似相等。< / p > < p > < strong > 参数< / strong > :< / p > < blockquote > < ul > < li > other (< a href = "#class-vector3" > < code > Vector3< / code > < / a > ): 另一个向量< / li > < li > epsilon (< a href = "https://docs.python.org/3/library/functions.html#float" target = "_blank" rel = "noreferrer" > < code > float< / code > < / a > ): 误差< / li > < / ul > < / blockquote > < p > < strong > 返回< / strong > : < a href = "https://docs.python.org/3/library/functions.html#bool" target = "_blank" rel = "noreferrer" > < code > bool< / code > < / a > : 是否近似相等< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L30" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > approx< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, other: < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Vector3' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , epsilon: < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > float< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > APPROX< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) -> < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > bool< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
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 >
2024-08-31 09:41:17 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > other ([`Vector3`](#class-vector3)): 另一个向量< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > epsilon ([`float`](https%3A//docs.python.org/3/library/functions.html#float)): 误差< / span > < / span >
2024-08-28 12:03:02 +08:00
< span class = "line" > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Returns:< / span > < / span >
2024-08-31 09:41:17 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > [`bool`](https%3A//docs.python.org/3/library/functions.html#bool): 是否近似相等< / span > < / span >
2024-08-28 12:03:02 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
2024-09-03 22:49:39 +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 > < h4 id = "method-cal-angle-self-other-vector3-anyangle" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > cal_angle(self, other: Vector3) -> AnyAngle< / code > < a class = "header-anchor" href = "#method-cal-angle-self-other-vector3-anyangle" aria-label = "Permalink to "***method*** `cal_angle(self, other: Vector3) -> AnyAngle`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : 计算两个向量之间的夹角。< / p > < p > < strong > 参数< / strong > :< / p > < blockquote > < ul > < li > other (< a href = "#class-vector3" > < code > Vector3< / code > < / a > ): 另一个向量< / li > < / ul > < / blockquote > < p > < strong > 返回< / strong > : < a href = "./angle.html#class-anyangle" > < code > AnyAngle< / code > < / a > : 夹角< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L42" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > cal_angle< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, other: < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Vector3' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) -> < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' AnyAngle' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
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 >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > other ([`Vector3`](#class-vector3)): 另一个向量< / span > < / span >
2024-08-28 12:03:02 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Returns:< / span > < / span >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > [`AnyAngle`](./angle#class-anyangle): 夹角< / span > < / span >
2024-08-28 12:03:02 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
2024-09-03 22:49:39 +08:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > AnyAngle(math.acos(< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > @< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > /< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .length < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other.length)), < / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > is_radian< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > True< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > )< / span > < / span > < / code > < / pre > < / div > < / details > < h4 id = "method-cross-self-other-vector3-vector3" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > cross(self, other: Vector3) -> Vector3< / code > < a class = "header-anchor" href = "#method-cross-self-other-vector3-vector3" aria-label = "Permalink to "***method*** `cross(self, other: Vector3) -> Vector3`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : 向量积 叉乘: v1 cross v2 -> v3< / p > < p > 叉乘为0, 则两向量平行。 其余结果的模为平行四边形的面积。< / p > < p > < strong > 参数< / strong > :< / p > < blockquote > < ul > < li > other (< a href = "#class-vector3" > < code > Vector3< / code > < / a > ): 另一个向量< / li > < / ul > < / blockquote > < p > < strong > 返回< / strong > : < a href = "#class-vector3" > < code > Vector3< / code > < / a > : 叉乘结果< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L52" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > cross< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, other: < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Vector3' < / 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 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;" > 向量积 叉乘: v1 cross v2 -> v3< / span > < / span >
< span class = "line" > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > 叉乘为0, 则两向量平行。< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > 其余结果的模为平行四边形的面积。< / span > < / span >
< span class = "line" > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > 返回如下行列式的结果:< / span > < / span >
< span class = "line" > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ``i j k``< / span > < / span >
< span class = "line" > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ``x1 y1 z1``< / span > < / span >
< span class = "line" > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ``x2 y2 z2``< / span > < / span >
< span class = "line" > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Args:< / span > < / span >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > other ([`Vector3`](#class-vector3)): 另一个向量< / span > < / span >
2024-08-28 12:03:02 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Returns:< / span > < / span >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > [`Vector3`](#class-vector3): 叉乘结果< / span > < / span >
2024-08-28 12:03:02 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
2024-09-03 22:49:39 +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;" > .y < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other.z < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > -< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .z < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other.y, < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .z < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other.x < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > -< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .x < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other.z, < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .x < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other.y < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > -< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .y < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other.x)< / span > < / span > < / code > < / pre > < / div > < / details > < h4 id = "method-is-approx-parallel-self-other-vector3-epsilon-float-approx-bool" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -> bool< / code > < a class = "header-anchor" href = "#method-is-approx-parallel-self-other-vector3-epsilon-float-approx-bool" aria-label = "Permalink to "***method*** `is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -> bool`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : 判断两个向量是否近似平行。< / p > < p > < strong > 参数< / strong > :< / p > < blockquote > < ul > < li > other (< a href = "#class-vector3" > < code > Vector3< / code > < / a > ): 另一个向量< / li > < li > epsilon (< a href = "https://docs.python.org/3/library/functions.html#float" target = "_blank" rel = "noreferrer" > < code > float< / code > < / a > ): 误差< / li > < / ul > < / blockquote > < p > < strong > 返回< / strong > : < a href = "https://docs.python.org/3/library/functions.html#bool" target = "_blank" rel = "noreferrer" > < code > bool< / code > < / a > : 是否近似平行< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L76" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > is_approx_parallel< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, other: < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Vector3' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , epsilon: < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > float< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > APPROX< / span > < span style = "--shiki-light:#24292
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 >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > other ([`Vector3`](#class-vector3)): 另一个向量< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > epsilon ([`float`](https%3A//docs.python.org/3/library/functions.html#float)): 误差< / span > < / span >
2024-08-28 12:03:02 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Returns:< / span > < / span >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > [`bool`](https%3A//docs.python.org/3/library/functions.html#bool): 是否近似平行< / span > < / span >
2024-08-28 12:03:02 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
2024-09-03 22:49:39 +08:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .cross(other).length < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > < < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > epsilon< / span > < / span > < / code > < / pre > < / div > < / details > < h4 id = "method-is-parallel-self-other-vector3-bool" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > is_parallel(self, other: Vector3) -> bool< / code > < a class = "header-anchor" href = "#method-is-parallel-self-other-vector3-bool" aria-label = "Permalink to "***method*** `is_parallel(self, other: Vector3) -> bool`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : 判断两个向量是否平行。< / p > < p > < strong > 参数< / strong > :< / p > < blockquote > < ul > < li > other (< a href = "#class-vector3" > < code > Vector3< / code > < / a > ): 另一个向量< / li > < / ul > < / blockquote > < p > < strong > 返回< / strong > : < a href = "https://docs.python.org/3/library/functions.html#bool" target = "_blank" rel = "noreferrer" > < code > bool< / code > < / a > : 是否平行< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L87" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > is_parallel< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, other: < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Vector3' < / 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 >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > other ([`Vector3`](#class-vector3)): 另一个向量< / span > < / span >
2024-08-28 12:03:02 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Returns:< / span > < / span >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > [`bool`](https%3A//docs.python.org/3/library/functions.html#bool): 是否平行< / span > < / span >
2024-08-28 12:03:02 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
2024-09-03 22:49:39 +08:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .cross(other).approx(zero_vector3)< / span > < / span > < / code > < / pre > < / div > < / details > < h4 id = "method-normalize-self" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > normalize(self)< / code > < a class = "header-anchor" href = "#method-normalize-self" aria-label = "Permalink to "***method*** `normalize(self)`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : 将向量归一化。< / p > < p > 自体归一化,不返回值。< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L97" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > normalize< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self):< / span > < / span >
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 >
< 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:#24292E;--shiki-dark:#E1E4E8;" > length < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .length< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .x < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > /=< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > length< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .y < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > /=< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > length< / span > < / span >
2024-09-03 22:49:39 +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;" > length< / span > < / span > < / code > < / pre > < / div > < / details > < p > < a href = "https://docs.python.org/3/library/functions.html#property" target = "_blank" rel = "noreferrer" > < code > @property< / code > < / a > < / p > < h4 id = "method-np-array-self-np-ndarray" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > np_array(self) -> np.ndarray< / code > < a class = "header-anchor" href = "#method-np-array-self-np-ndarray" aria-label = "Permalink to "***method*** `np_array(self) -> np.ndarray`"" > < / a > < / h4 > < p > < strong > 返回< / strong > : < a href = "https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html" target = "_blank" rel = "noreferrer" > < code > np.ndarray< / code > < / a > : numpy数组< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L109" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > @< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > property< / span > < / span >
2024-08-28 12:03:02 +08:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > np_array< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self) -> < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' np.ndarray' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > 返回numpy数组< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Returns:< / span > < / span >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > [`np.ndarray`](https%3A//numpy.org/doc/stable/reference/generated/numpy.ndarray.html): numpy数组< / span > < / span >
2024-08-28 12:03:02 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
2024-09-03 22:49:39 +08:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > np.array([< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .x, < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .y, < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .z])< / span > < / span > < / code > < / pre > < / div > < / details > < p > < a href = "https://docs.python.org/3/library/functions.html#property" target = "_blank" rel = "noreferrer" > < code > @property< / code > < / a > < / p > < h4 id = "method-length-self-float" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > length(self) -> float< / code > < a class = "header-anchor" href = "#method-length-self-float" aria-label = "Permalink to "***method*** `length(self) -> float`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : 向量的模。< / p > < p > < strong > 返回< / strong > : < a href = "https://docs.python.org/3/library/functions.html#float" target = "_blank" rel = "noreferrer" > < code > float< / code > < / a > : 模< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L119" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > @< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > property< / span > < / span >
2024-08-28 12:03:02 +08:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > length< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self) -> < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > float< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > 向量的模。< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Returns:< / span > < / span >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > [`float`](https%3A//docs.python.org/3/library/functions.html#float): 模< / span > < / span >
2024-08-28 12:03:02 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
2024-09-03 22:49:39 +08:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > math.sqrt(< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .x < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > **< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > 2< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > +< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .y < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > **< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > 2< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > +< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .z < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > **< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > 2< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > )< / span > < / span > < / code > < / pre > < / div > < / details > < p > < a href = "https://docs.python.org/3/library/functions.html#property" target = "_blank" rel = "noreferrer" > < code > @property< / code > < / a > < / p > < h4 id = "method-unit-self-vector3" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > unit(self) -> Vector3< / code > < a class = "header-anchor" href = "#method-unit-self-vector3" aria-label = "Permalink to "***method*** `unit(self) -> Vector3`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : 获取该向量的单位向量。< / p > < p > < strong > 返回< / strong > : < a href = "#class-vector3" > < code > Vector3< / code > < / a > : 单位向量< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L128" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > @< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > property< / span > < / span >
2024-08-28 12:03:02 +08:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > unit< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self) -> < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Vector3' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > 获取该向量的单位向量。< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Returns:< / span > < / span >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > [`Vector3`](#class-vector3): 单位向量< / span > < / span >
2024-08-28 12:03:02 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
2024-09-03 22:49:39 +08:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > /< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .length< / span > < / span > < / code > < / pre > < / div > < / details > < h4 id = "method-abs-self" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > __abs__(self)< / code > < a class = "header-anchor" href = "#method-abs-self" aria-label = "Permalink to "***method*** `__abs__(self)`"" > < / a > < / h4 > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L136" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > __abs__< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self):< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .length< / span > < / span > < / code > < / pre > < / div > < / details > < p > < code > @overload< / code > < / p > < h4 id = "method-self-other-vector3-vector3" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > self + other: Vector3 => Vector3< / code > < a class = "header-anchor" href = "#method-self-other-vector3-vector3" aria-label = "Permalink to "***method*** `self + other: Vector3 => Vector3`"" > < / a > < / h4 > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L140" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > @overload< / span > < / span >
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;" > ' Vector3' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
2024-09-03 22:49:39 +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 = "method-self-other-point3-point3" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > self + other: Point3 => Point3< / code > < a class = "header-anchor" href = "#method-self-other-point3-point3" aria-label = "Permalink to "***method*** `self + other: Point3 => Point3`"" > < / a > < / h4 > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L144" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > @overload< / span > < / span >
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-09-03 22:49:39 +08:00
< span class = "line" > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > ...< / span > < / span > < / code > < / pre > < / div > < / details > < h4 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 "***method*** `self + other`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : V + P -> P< / p > < p > V + V -> V< / p > < p > < strong > 参数< / strong > :< / p > < blockquote > < ul > < li > other (< a href = "#class-vector3" > < code > Vector3< / code > < / a > | < a href = "./point.html#class-point3" > < code > Point3< / code > < / a > ): 另一个向量或点< / li > < / ul > < / blockquote > < p > < strong > 返回< / strong > : < a href = "#class-vector3" > < code > Vector3< / code > < / a > | < a href = "./point.html#class-point3" > < code > Point3< / code > < / a > : 新的向量或点< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L147" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > __add__< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, other):< / span > < / span >
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;" > V + P -> P< / span > < / span >
< span class = "line" > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > V + V -> V< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Args:< / span > < / span >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > other ([`Vector3`](#class-vector3) | [`Point3`](./point#class-point3)): 另一个向量或点< / span > < / span >
2024-08-28 20:35:22 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Returns:< / span > < / span >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > [`Vector3`](#class-vector3) | [`Point3`](./point#class-point3): 新的向量或点< / 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:#D73A49;--shiki-dark:#F97583;" > if< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > isinstance< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (other, Vector3):< / 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 >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > elif< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > isinstance< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (other, Point3):< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > Point3(< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .x < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > +< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other.x, < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .y < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > +< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other.y, < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .z < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > +< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other.z)< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > else< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
2024-09-03 22:49:39 +08:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > raise< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > TypeError< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > f< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " unsupported operand type(s) for +: ' Vector3' and ' < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > {type< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (other)< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > }< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' " < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > )< / span > < / span > < / code > < / pre > < / div > < / details > < h4 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 "***method*** `__eq__(self, other)`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : 判断两个向量是否相等。< / p > < p > < strong > 参数< / strong > :< / p > < blockquote > < ul > < li > other (< a href = "#class-vector3" > < code > Vector3< / code > < / a > ): 另一个向量< / li > < / ul > < / blockquote > < p > < strong > 返回< / strong > : < a href = "https://docs.python.org/3/library/functions.html#bool" target = "_blank" rel = "noreferrer" > < code > bool< / code > < / a > : 是否相等< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L163" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > __eq__< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, other):< / span > < / span >
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 >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > other ([`Vector3`](#class-vector3)): 另一个向量< / span > < / span >
2024-08-28 20:35:22 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Returns:< / span > < / span >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > [`bool`](https%3A//docs.python.org/3/library/functions.html#bool): 是否相等< / span > < / span >
2024-08-28 20:35:22 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
2024-09-03 22:49:39 +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 = "method-self-other-point3-point3-1" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > self + other: Point3 => Point3< / code > < a class = "header-anchor" href = "#method-self-other-point3-point3-1" aria-label = "Permalink to "***method*** `self + other: Point3 => Point3`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : P + V -> P< / p > < p > 别去点那边实现了。< / p > < p > < strong > 参数< / strong > :< / p > < blockquote > < ul > < li > other (< a href = "./point.html#class-point3" > < code > Point3< / code > < / a > ): 另一个点< / li > < / ul > < / blockquote > < p > < strong > 返回< / strong > : < a href = "./point.html#class-point3" > < code > Point3< / code > < / a > : 新的点< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L173" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > __radd__< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, other: < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' 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-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 >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > 别去点那边实现了。< / span > < / span >
2024-08-31 09:34:37 +08:00
< 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 ([`Point3`](./point#class-point3)): 另一个点< / 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;" > [`Point3`](./point#class-point3): 新的点< / span > < / span >
2024-08-28 20:35:22 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
2024-09-03 22:49:39 +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 > < p > < code > @overload< / code > < / p > < h4 id = "method-self-other-vector3-vector3-1" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > self - other: Vector3 => Vector3< / code > < a class = "header-anchor" href = "#method-self-other-vector3-vector3-1" aria-label = "Permalink to "***method*** `self - other: Vector3 => Vector3`"" > < / a > < / h4 > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L185" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > @overload< / span > < / span >
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;" > __sub__< / 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;" > ' Vector3' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
2024-09-03 22:49:39 +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 = "method-self-other-point3-point3-2" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > self - other: Point3 => Point3< / code > < a class = "header-anchor" href = "#method-self-other-point3-point3-2" aria-label = "Permalink to "***method*** `self - other: Point3 => Point3`"" > < / a > < / h4 > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L189" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > @overload< / span > < / span >
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;" > __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;" > ' Point3' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
2024-09-03 22:49:39 +08:00
< span class = "line" > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > ...< / span > < / span > < / code > < / pre > < / div > < / details > < h4 id = "method-self-other-1" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > self - other< / code > < a class = "header-anchor" href = "#method-self-other-1" aria-label = "Permalink to "***method*** `self - other`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : V - P -> P< / p > < p > V - V -> V< / p > < p > < strong > 参数< / strong > :< / p > < blockquote > < ul > < li > other (< a href = "#class-vector3" > < code > Vector3< / code > < / a > | < a href = "./point.html#class-point3" > < code > Point3< / code > < / a > ): 另一个向量或点< / li > < / ul > < / blockquote > < p > < strong > 返回< / strong > : < a href = "#class-vector3" > < code > Vector3< / code > < / a > | < a href = "./point.html#class-point3" > < code > Point3< / code > < / a > : 新的向量< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L192" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > __sub__< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, other):< / span > < / span >
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;" > V - P -> P< / span > < / span >
< span class = "line" > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > V - V -> V< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Args:< / span > < / span >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > other ([`Vector3`](#class-vector3) | [`Point3`](./point#class-point3)): 另一个向量或点< / span > < / span >
2024-08-28 20:35:22 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Returns:< / span > < / span >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > [`Vector3`](#class-vector3) | [`Point3`](./point#class-point3): 新的向量< / 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:#D73A49;--shiki-dark:#F97583;" > if< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > isinstance< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (other, Vector3):< / 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 >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > elif< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > isinstance< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (other, Point3):< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > Point3(< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .x < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > -< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other.x, < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .y < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > -< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other.y, < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .z < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > -< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other.z)< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > else< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
2024-09-03 22:49:39 +08:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > raise< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > TypeError< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > f< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' unsupported operand type(s) for -: " Vector3" and " < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > {type< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (other)< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > }< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " ' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > )< / span > < / span > < / code > < / pre > < / div > < / details > < h4 id = "method-self-other-point3" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > self - other: Point3< / code > < a class = "header-anchor" href = "#method-self-other-point3" aria-label = "Permalink to "***method*** `self - other: Point3`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : P - V -> P< / p > < p > < strong > 参数< / strong > :< / p > < blockquote > < ul > < li > other (< a href = "./point.html#class-point3" > < code > Point3< / code > < / a > ): 另一个点< / li > < / ul > < / blockquote > < p > < strong > 返回< / strong > : < a href = "./point.html#class-point3" > < code > Point3< / code > < / a > : 新的点< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L208" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > __rsub__< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, other: < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Point3' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ):< / 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;" > Args:< / span > < / span >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > other ([`Point3`](./point#class-point3)): 另一个点< / span > < / span >
2024-08-28 20:35:22 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Returns:< / span > < / span >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > [`Point3`](./point#class-point3): 新的点< / 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:#D73A49;--shiki-dark:#F97583;" > if< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > isinstance< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (other, Point3):< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > Point3(other.x < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > -< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .x, other.y < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > -< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .y, other.z < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > -< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .z)< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > else< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
2024-09-03 22:49:39 +08:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > raise< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > TypeError< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > f< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " unsupported operand type(s) for -: ' < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > {type< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (other)< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > }< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' and ' Vector3' " < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > )< / span > < / span > < / code > < / pre > < / div > < / details > < p > < code > @overload< / code > < / p > < h4 id = "method-self-other-vector3-vector3-2" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > self * other: Vector3 => Vector3< / code > < a class = "header-anchor" href = "#method-self-other-vector3-vector3-2" aria-label = "Permalink to "***method*** `self * other: Vector3 => Vector3`"" > < / a > < / h4 > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L223" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > @overload< / span > < / span >
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;" > __mul__< / 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;" > ' Vector3' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
2024-09-03 22:49:39 +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 = "method-self-other-realnumber-vector3" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > self * other: RealNumber => Vector3< / code > < a class = "header-anchor" href = "#method-self-other-realnumber-vector3" aria-label = "Permalink to "***method*** `self * other: RealNumber => Vector3`"" > < / a > < / h4 > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L227" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > @overload< / span > < / span >
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;" > __mul__< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, other: RealNumber) -> < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Vector3' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
2024-09-03 22:49:39 +08:00
< span class = "line" > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > ...< / span > < / span > < / code > < / pre > < / div > < / details > < h4 id = "method-self-other-int-float-vector3-vector3" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > self * other: int | float | Vector3 => Vector3< / code > < a class = "header-anchor" href = "#method-self-other-int-float-vector3-vector3" aria-label = "Permalink to "***method*** `self * other: int | float | Vector3 => Vector3`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : 数组运算 非点乘。点乘使用@, 叉乘使用cross。< / p > < p > < strong > 参数< / strong > :< / p > < blockquote > < ul > < li > other (< a href = "#class-vector3" > < code > Vector3< / code > < / a > | < a href = "https://docs.python.org/3/library/functions.html#float" target = "_blank" rel = "noreferrer" > < code > float< / code > < / a > ): 另一个向量或数< / li > < / ul > < / blockquote > < p > < strong > 返回< / strong > : < a href = "#class-vector" > < code > Vector3< / code > < / a > : 数组运算结果< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L230" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > __mul__< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, other: < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' int | float | Vector3' < / 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 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;" > 数组运算 非点乘。点乘使用@, 叉乘使用cross。< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Args:< / span > < / span >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > other ([`Vector3`](#class-vector3) | [`float`](https%3A//docs.python.org/3/library/functions.html#float)): 另一个向量或数< / span > < / span >
2024-08-28 20:35:22 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Returns:< / span > < / span >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > [`Vector3`](#class-vector): 数组运算结果< / 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:#D73A49;--shiki-dark:#F97583;" > if< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > isinstance< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (other, Vector3):< / 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 >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > elif< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > isinstance< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (other, (< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > float< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > int< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > )):< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > Vector3(< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .x < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other, < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .y < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other, < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .z < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other)< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > else< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
2024-09-03 22:49:39 +08:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > raise< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > TypeError< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > f< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " unsupported operand type(s) for *: ' Vector3' and ' < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > {type< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (other)< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > }< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' " < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > )< / span > < / span > < / code > < / pre > < / div > < / details > < h4 id = "method-self-other-realnumber-vector3-1" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > self * other: RealNumber => Vector3< / code > < a class = "header-anchor" href = "#method-self-other-realnumber-vector3-1" aria-label = "Permalink to "***method*** `self * other: RealNumber => Vector3`"" > < / a > < / h4 > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L246" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > __rmul__< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, other: < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' RealNumber' < / 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 >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > __mul__< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (other)< / span > < / span > < / code > < / pre > < / div > < / details > < h4 id = "method-self-other-vector3-realnumber" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > self @ other: Vector3 => RealNumber< / code > < a class = "header-anchor" href = "#method-self-other-vector3-realnumber" aria-label = "Permalink to "***method*** `self @ other: Vector3 => RealNumber`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : 点乘。< / p > < p > < strong > 参数< / strong > :< / p > < blockquote > < ul > < li > other (< a href = "#class-vector3" > < code > Vector3< / code > < / a > ): 另一个向量< / li > < / ul > < / blockquote > < p > < strong > 返回< / strong > : < a href = "https://docs.python.org/3/library/functions.html#float" target = "_blank" rel = "noreferrer" > < code > float< / code > < / a > : 点乘结果< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L249" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > __matmul__< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, other: < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Vector3' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) -> < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' RealNumber' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / 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 >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > other ([`Vector3`](#class-vector3)): 另一个向量< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Returns:< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > [`float`](https%3A//docs.python.org/3/library/functions.html#float): 点乘结果< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
2024-09-03 22:49:39 +08:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .x < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other.x < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > +< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .y < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other.y < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > +< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .z < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other.z< / span > < / span > < / code > < / pre > < / div > < / details > < h4 id = "method-self-other-realnumber-vector3-2" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > self / other: RealNumber => Vector3< / code > < a class = "header-anchor" href = "#method-self-other-realnumber-vector3-2" aria-label = "Permalink to "***method*** `self / other: RealNumber => Vector3`"" > < / a > < / h4 > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L259" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > __truediv__< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, other: RealNumber) -> < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Vector3' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > Vector3(< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .x < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > /< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other, < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .y < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > /< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other, < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .z < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > /< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > other)< / span > < / span > < / code > < / pre > < / div > < / details > < h4 id = "method-self-vector3" tabindex = "-1" > < em > < strong > method< / strong > < / em > < code > - self => Vector3< / code > < a class = "header-anchor" href = "#method-self-vector3" aria-label = "Permalink to "***method*** `- self => Vector3`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : 取负。< / p > < p > < strong > 返回< / strong > : < a href = "#class-vector3" > < code > Vector3< / code > < / a > : 负向量< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/snowykami/mbcp/tree/main/mbcp/mp_math/vector.py#L262" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > __neg__< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self) -> < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Vector3' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
2024-08-31 09:34:37 +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 >
2024-08-28 20:35:22 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > Returns:< / span > < / span >
2024-08-31 09:34:37 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > [`Vector3`](#class-vector3): 负向量< / span > < / span >
2024-08-28 20:35:22 +08:00
< span class = "line" > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > " " " < / span > < / span >
2024-09-03 22:49:39 +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:#D73A49;--shiki-dark:#F97583;" > -< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .x, < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > -< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .y, < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > -< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .z)< / span > < / span > < / code > < / pre > < / div > < / details > < h3 id = "var-zero-vector3" tabindex = "-1" > var < code > zero_vector3< / code > < a class = "header-anchor" href = "#var-zero-vector3" aria-label = "Permalink to "var `zero_vector3`"" > < / a > < / h3 > < ul > < li > < p > < strong > 说明< / strong > : 零向量< / p > < / li > < li > < p > < strong > 类型< / strong > : < code > Vector3< / code > < / p > < / li > < li > < p > < strong > 默认值< / strong > : < code > Vector3(0, 0, 0)< / code > < / p > < / li > < / ul > < h3 id = "var-x-axis" tabindex = "-1" > var < code > x_axis< / code > < a class = "header-anchor" href = "#var-x-axis" aria-label = "Permalink to "var `x_axis`"" > < / a > < / h3 > < ul > < li > < p > < strong > 说明< / strong > : x轴单位向量< / p > < / li > < li > < p > < strong > 类型< / strong > : < code > Vector3< / code > < / p > < / li > < li > < p > < strong > 默认值< / strong > : < code > Vector3(1, 0, 0)< / code > < / p > < / li > < / ul > < h3 id = "var-y-axis" tabindex = "-1" > var < code > y_axis< / code > < a class = "header-anchor" href = "#var-y-axis" aria-label = "Permalink to "var `y_axis`"" > < / a > < / h3 > < ul > < li > < p > < strong > 说明< / strong > : y轴单位向量< / p > < / li > < li > < p > < strong > 类型< / strong > : < code > Vector3< / code > < / p > < / li > < li > < p > < strong > 默认值< / strong > : < code > Vector3(0, 1, 0)< / code > < / p > < / li > < / ul > < h3 id = "var-z-axis" tabindex = "-1" > var < code > z_axis< / code > < a class = "header-anchor" href = "#var-z-axis" aria-label = "Permalink to "var `z_axis`"" > < / a > < / h3 > < ul > < li > < p > < strong > 说明< / strong > : z轴单位向量< / p > < / li > < li > < p > < strong > 类型< / strong > : < code > Vector3< / code > < / p > < / li > < li > < p > < strong > 默认值< / strong > : < code > Vector3(0, 0, 1)< / code > < / p > < / li > < / ul > < / div > < / div > < / main > < footer class = "VPDocFooter" data-v-01c90815 data-v-28deee4a > <!-- [ --> <!-- ] --> < div class = "edit-info" data-v-28deee4a > < div class = "edit-link" data-v-28deee4a > < a class = "VPLink link vp-external-link-icon no-icon edit-link-button" href = "https://github.com/snowykami/mbcp/tree/main/mbcp//mp_math/vector.py" target = "_blank" rel = "noreferrer" data-v-28deee4a > <!-- [ --> < span class = "vpi-square-pen edit-link-icon" data-v-28deee4a > < / span > 在 GitHub 上编辑此页<!-- ] --> < / a > < / div > <!-- --> < / div > < nav class = "prev-next" aria-labelledby = "doc-footer-aria-label" data-v-28deee4a > < span class = "visually-hidden" id = "doc-footer-aria-label" data-v-28deee4a > Pager< / span > < div class = "pager" data-v-28deee4a > < a class = "VPLink link pager-link prev" href = "/api/mp_math/utils.html" data-v-28deee4a > <!-- [ --> < span class = "desc" data-v-28deee4a > 上一页< / span > < span class = "title" data-v-28deee4a > mbcp.mp_math.utils< / span > <!-- ] --> < / a > < / div > < div class = "pager" data-v-28deee4a > < a class = "VPLink link pager-link next" href = "/api/particle/" data-v-28deee4a > <!-- [ --> < span class = "desc" data-v-28deee4a > 下一页< / span > < span class = "title" data-v-28deee4a > mbcp.particle< / span > <!-- ] --> < / a > < / div > < / nav > < / footer > <!-- [ --> <!-- ] --> < / div > < / div > < / div > <!-- [ --> <!-- ] --> < / div > < / div > < footer class = "VPFooter has-sidebar" data-v-3b4648ff data-v-d69bcf5d > < div class = "container" data-v-d69bcf5d > < p class = "message" data-v-d69bcf5d > 文档由 < a href = "https://vitepress.dev/" > VitePress< / a > 构建 | API引用由 < a href = "https://github.com/LiteyukiStudio/litedoc" > litedoc< / a > 生成< / p > < p class = "copyright" data-v-d69bcf5d > Copyright (C) 2020-2024 SnowyKami. All Rights Reserved< / p > < / div > < / footer > <!-- [ --> <!-- ] --> < / div > < / div >
2024-09-04 19:22:16 +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 _ i n d e x . m d \ " : \ " B O 3 O G C Z m \ " , \ " a p i _ m p _ m a t h _ a n g l e . m d \ " : \ " D X j H P M c Z \ " , \ " a p i _ m p _ m a t h _ c o n s t . m d \ " : \ " B _ A P a Y - d \ " , \ " a p i _ m p _ m a t h _ e q u a t i o n . m d \ " : \ " q a T L b d s 6 \ " , \ " a p i _ m p _ m a t h _ f u n c t i o n . m d \ " : \ " D 6 S k - j U O \ " , \ " a p i _ m p _ m a t h _ i n d e x . m d \ " : \ " B f S A i 6 Y B \ " , \ " a p i _ m p _ m a t h _ l i n e . m d \ " : \ " K - H h I s v U \ " , \ " a p i _ m p _ m a t h _ m p _ m a t h _ t y p i n g . m d \ " : \ " D 0 j H a H h o \ " , \ " a p i _ m p _ m a t h _ p l a n e . m d \ " : \ " D Q h j z D 0 6 \ " , \ " a p i _ m p _ m a t h _ p o i n t . m d \ " : \ " N L p _ S g 9 U \ " , \ " a p i _ m p _ m a t h _ s e g m e n t . m d \ " : \ " C 2 P E P 6 H 5 \ " , \ " a p i _ m p _ m a t h _ u t i l s . m d \ " : \ " Q B 0 h G G M g \ " , \ " a p i _ m p _ m a t h _ v e c t o r . m d \ " : \ " B 1 W u 6 c 9 G \ " , \ " a p i _ p a r t i c l e _ i n d e x . m d \ " : \ " B n a J l v r B \ " , \ " a p i _ p r e s e t s _ i n d e x . m d \ " : \ " C n 3 t b i U 4 \ " , \ " a p i _ p r e s e t s _ m o d e l _ i n d e x . m d \ " : \ " B H 3 a z K A 8 \ " , \ " d e m o _ b e s t - p r a c t i c e . m d \ " : \ " C m Y j f r x d \ " , \ " d e m o _ i n d e x . m d \ " : \ " C V A d l a F I \ " , \ " e n _ a p i _ i n d e x . m d \ " : \ " C 0 - L R r M B \ " , \ " e n _ a p i _ m p _ m a t h _ a n g l e . m d \ " : \ " B 5 t d t B i M \ " , \ " e n _ a p i _ m p _ m a t h _ c o n s t . m d \ " : \ " f - 2 w Q H W 5 \ " , \ " e n _ a p i _ m p _ m a t h _ e q u a t i o n . m d \ " : \ " N 3 o P - 7 U a \ " , \ " e n _ a p i _ m p _ m a t h _ f u n c t i o n . m d \ " : \ " B T 0 N B _ 1 n \ " , \ " e n _ a p i _ m p _ m a t h _ i n d e x . m d \ " : \ " B i D C W h u z \ " , \ " e n _ a p i _ m p _ m a t h _ l i n e . m d \ " : \ " 0 b B p Z M y n \ " , \ " 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 \ " : \ " A 2 o A W I N P \ " , \ " e n _ a p i _ m p _ m a t h _ p l a n e . m d \ " : \ " o p 2 O K 8 n C \ " , \ " e n _ a p i _ m p _ m a t h _ p o i n t . m d \ " : \ " B a _ i 7 d D C \ " , \ " e n _ a p i _ m p _ m a t h _ s e g m e n t . m d \ " : \ " B h I G b 9 y q \ " , \ " e n _ a p i _ m p _ m a t h _ u t i l s . m d \ " : \ " B z - x J h l 3 \ " , \ " e n _ a p i _ m p _ m a t h _ v e c t o r . m d \ " : \ " D p z q y c D g \ " , \ " e n _ a p i _ p a r t i c l e _ i n d e x . m d \ " : \ " j 3 _ p 5 K t Y \ " , \ " e n _ a p i _ p r e s e t s _ i n d e x . m d \ " : \ " B j 8 H Q N _ s \ " , \ " e n _ a p i _ p r e s e t s _ m o d e l _ i n d e x . m d \ " : \ " t R S L Y 1 0 d \ " , \ " e n _ d e m o _ b e s t - p r a c t i c e . m d \ " : \ " C m t Y 1 0 5 n \ " , \ " 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 \ " : \ " C c - N t 9 O t \ " , \ " 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 \ " : \ " C J O q v l S E \ " , \ " i n d e x . m d \ " : \ " W V p b C 1 C 1 \ " , \ " j a _ a p i _ i n d e x . m d \ " : \ " C G n g N E P X \ " , \ " j a _ a p i _ m p _ m a t h _ a n g l e . m d \ " : \ " B P p e n A m _ \ " , \ " j a _ a p i _ m p _ m a t h _ c o n s t . m d \ " : \ " k K A d 6 i h V \ " , \ " j a _ a p i _ m p _ m a t h _ e q u a t i o n . m d \ " : \ " C x c 2 A y G q \ " , \ " j a _ a p i _ m p _ m a t h _ f u n c t i o n . m d \ " : \ " z c K 7 s 9 - C \ " , \ " j a _ a p i _ m p _ m a t h _ i n d e x . m d \ " : \ " B C R e R K f D \ " , \ " j a _ a p i _ m p _ m a t h _ l i n e . m d \ " : \ " B U E G 7 Q n 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 \ " : \ " C z E P V 5 E p \ " , \ " j a _ a p i _ m p _ m a t h _ p l a n e . m d \ " : \ " D 8 l t D T I 9 \ " , \ " j a _ a p i _ m p _ m a t h _ p o i n t . m d \ " : \ " B j _ w y a C j \ " , \ " j a _ a p i _ m p _ m a t h _ s e g m e n t . m d \ " : \ " h B K U n t D s \ " , \ " j a _ a p i _ m p _ m a t h _ u t i l s . m d \ " : \ " D d r b P Y - j \ " , \ " j a _ a p i _ m p _ m a t h _ v e c t o r . m d \ " : \ " D _ i X I 2 n w \ " , \ " j a _ a p i _ p a r t i c l e _ i n d e x . m d \ " : \ " C W 1 r q a r C \ " , \ " j a _ a p i _ p r e s e t s _ i n d e x . m d \ " : \ " B F c _ P f J b \ " , \ " j a _ a p i _ p r e s e t s _ m o d e l _ i n d e x . m d \ " : \ " B q E j Z 7 I Y \ " , \ " j a _ d e m o _ b e s t - p r a c t i c e . m d \ " : \ " C B H i F 6 e c \ " , \ " 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 \ " : \ " B v j V 8 R I J \ " , \ " 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 _ i n d e x . m d \ " : \ " B h 7 I C G 6 U \ " , \ " z h t _ a p i _ m p _ m a t h _ a n g l e . m d \ " : \ " m m e c N I J M \ " , \ " z h t _ a p i _ m p _ m a t h _ c o n s t . m d \ " : \ " D 9 e B w c N w \ " , \ " z h t _ a p i _ m p _ m a t h _ e q u a t i o n . m d \ " : \ " B 0 0 I W O _ d \ " , \ " z h t _ a p i _ m p _ m a t h _ f u n c t i o n . m d \ " : \ " B n U e r g l v \ " , \ " z h t _ a p i _ m p _ m a t h _ i n d e x . m d \ " : \ " D V q L R Z h m \ " , \ " z h t _ a p i _ m p _ m a t h _ l i n e . m d \ " : \ " D g 3 j i _ d G \ " , \ " 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 W z R f F J e \ " , \ " z h t _ a p i _ m p _ m a t h _ p l a n e . m d \ " : \ " C - 9 I g W h _ \ " , \ " z h t _ a p i _ m p _ m a t h _ p o i n t . m d \ " : \ " v F M E E e V u \ " , \ " z h t _ a p i _ m p _ m a t h _ s e g m e n t . m d \ " : \ " B u D H b w Y P \ " , \ " z h t _ a p i _ m p _ m a t h _ u t i l s . m d \ " : \ " D v x T Z y 5 j \ " , \ " z h t _ a p i _ m p _ m a t h _ v e c t o r . m d \ " : \ " h A G 5 6 f d m \ " , \ " z h t _ a p i _ p a r t i c l e _ i n d e x . m d \ " : \ " b d o u G 1 s k \ " , \ " z h t _ a p i _ p r e s e t s _ i n d e x . m d \ " : \ " 9 w d P A k K N \ " , \ " 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 y r J s c B T \ " , \ " z h t _ d e m o _ b e s t - p r a c t i c e . m d \ " : \ " C P N b D _ L g \ " , \ " 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 \ " : \ " f k O Y k Z Z e \ " , \ " 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 ) ? r . m a p ( d e s e r i a l i z e F u n c t i o n s ) : t y p e o f r = = " o b j e c t " & & r ! = = n u l l ? O b j e c t . k e y s ( r ) . r e d u c e ( ( t , n ) = > ( t [ n ] = d e s e r i a l i z e F u n c t i o n s ( r [ n ] ) , t ) , { } ) : t y p e o f r = = " s t r i n g " & & r . s t a r t s W i t h ( " _ v p - f n _ " ) ? n e w F u n c t i o n ( ` r e t u r n $ { r . s l i c e ( 7 ) } ` ) ( ) : r } ; w i n d o w . _ _ V P _ S I T E _ D A T A _ _ = d e s e r i a l i z e F u n c t i o n s ( J S O N . p a r s e ( " { \ " l a n g \ " : \ " e n - U S \ " , \ " d i r \ " : \ " l t r \ " , \ " t i t l e \ " : \ " V i t e P r e s s \ " , \ " d e s c r i p t i o n \ " : \ " A V i t e P r e s s s i t e \ " , \ " b a s e \ " : \ " / \ " , \ " h e a d \ " : [ ] , \ " r o u t e r \ " : { \ " p r e f e t c h L i n k s \ " : t r u e } , \ " a p p e a r a n c e \ " : t r u e , \ " t h e m e C o n f i g \ " : { \ " l o g o \ " : \ " / m b c p - l o g o . s v g \ " , \ " s i d e b a r \ " : { \ " / a p i / \ " : { \ " b a s e \ " : \ " / a p i / \ " , \ " i t e m s \ " : [ { \ " t e x t \ " : \ " M B C P \ " , \ " i t e m s \ " : [ { \ " t e x t \ " : \ " m p _ m a t h \ " , \ " i t e m s \ " : [ { \ " t e x t \ " : \ " m b c p . m p _ m a t h . a n g l e \ " , \ " l i n k \ " : \ " m p _ m
2024-08-28 12:03:02 +08:00
< / body >
< / html >