Skip to content

Commit

Permalink
🐛 修改dead link
Browse files Browse the repository at this point in the history
  • Loading branch information
snowykami committed Aug 31, 2024
1 parent 253b816 commit 60763de
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions mbcp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
本模块是主模块,提供了一些工具
可导入
[`mbcp.mp_math`](./mp_math):数学工具
[`mbcp.mp_math`](./mp_math/):数学工具
[`mbcp.particle`](./particle):粒子生成工具
[`mbcp.particle`](./particle/):粒子生成工具
[`mbcp.presets`](./presets):预设
[`mbcp.presets`](./presets/):预设
"""
from .mp_math import *
12 changes: 6 additions & 6 deletions mbcp/mp_math/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ def __init__(self, x: float, y: float, z: float):
"""
3维向量
Args:
x: x轴分量
y: y轴分量
z: z轴分量
x ([`float`](https%3A//docs.python.org/3/library/functions.html#float)): x轴分量
y (`float`): y轴分量
z (`float`): z轴分量
"""
self.x = x
self.y = y
Expand All @@ -31,11 +31,11 @@ def approx(self, other: 'Vector3', epsilon: float = APPROX) -> bool:
"""
判断两个向量是否近似相等。
Args:
other:
epsilon:
other ([`Vector3`](#class-vector3)): 另一个向量
epsilon ([`float`](https%3A//docs.python.org/3/library/functions.html#float)): 误差
Returns:
是否近似相等
[`bool`](https%3A//docs.python.org/3/library/functions.html#bool): 是否近似相等
"""
return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

Expand Down

0 comments on commit 60763de

Please sign in to comment.