mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
doc fix
This commit is contained in:
parent
f2d5fbbb94
commit
61f837ac2c
@ -9,7 +9,7 @@ https://github.com/blueloveTH/pocketpy/blob/main/include/typings/linalg.pyi
|
||||
|
||||
```python
|
||||
from typing import overload
|
||||
from c import _StructLike
|
||||
from c import _StructLike, float_p
|
||||
|
||||
class vec2(_StructLike['vec2']):
|
||||
x: float
|
||||
@ -19,6 +19,7 @@ class vec2(_StructLike['vec2']):
|
||||
def __add__(self, other: vec2) -> vec2: ...
|
||||
def __sub__(self, other: vec2) -> vec2: ...
|
||||
def __mul__(self, other: float) -> vec2: ...
|
||||
def __rmul__(self, other: float) -> vec2: ...
|
||||
def __truediv__(self, other: float) -> vec2: ...
|
||||
def dot(self, other: vec2) -> float: ...
|
||||
def cross(self, other: vec2) -> float: ...
|
||||
@ -37,6 +38,7 @@ class vec3(_StructLike['vec3']):
|
||||
def __add__(self, other: vec3) -> vec3: ...
|
||||
def __sub__(self, other: vec3) -> vec3: ...
|
||||
def __mul__(self, other: float) -> vec3: ...
|
||||
def __rmul__(self, other: float) -> vec3: ...
|
||||
def __truediv__(self, other: float) -> vec3: ...
|
||||
def dot(self, other: vec3) -> float: ...
|
||||
def cross(self, other: vec3) -> float: ...
|
||||
@ -54,6 +56,7 @@ class vec4(_StructLike['vec4']):
|
||||
def __add__(self, other: vec4) -> vec4: ...
|
||||
def __sub__(self, other: vec4) -> vec4: ...
|
||||
def __mul__(self, other: float) -> vec4: ...
|
||||
def __rmul__(self, other: float) -> vec4: ...
|
||||
def __truediv__(self, other: float) -> vec4: ...
|
||||
def dot(self, other: vec4) -> float: ...
|
||||
def length(self) -> float: ...
|
||||
@ -90,6 +93,7 @@ class mat3x3(_StructLike['mat3x3']):
|
||||
def __add__(self, other: mat3x3) -> mat3x3: ...
|
||||
def __sub__(self, other: mat3x3) -> mat3x3: ...
|
||||
def __mul__(self, other: float) -> mat3x3: ...
|
||||
def __rmul__(self, other: float) -> mat3x3: ...
|
||||
def __truediv__(self, other: float) -> mat3x3: ...
|
||||
|
||||
def __invert__(self) -> mat3x3: ...
|
||||
@ -118,4 +122,9 @@ class mat3x3(_StructLike['mat3x3']):
|
||||
def transform_point(self, p: vec2) -> vec2: ...
|
||||
def transform_vector(self, v: vec2) -> vec2: ...
|
||||
|
||||
vec2_p = float_p
|
||||
vec3_p = float_p
|
||||
vec4_p = float_p
|
||||
mat3x3_p = float_p
|
||||
|
||||
```
|
||||
|
@ -3,7 +3,7 @@ icon: package
|
||||
label: operator
|
||||
---
|
||||
|
||||
The operator module exports a set of efficient functions corresponding to the intrinsic operators of Python. For example, operator.add(x, y) is equivalent to the expression x+y.
|
||||
The operator module exports a set of efficient functions corresponding to the intrinsic operators of Python. For example, `operator.add(x, y)` is equivalent to the expression `x+y`.
|
||||
Many function names are those used for special methods, without the double underscores.
|
||||
|
||||
+ `operator.lt(a, b)`
|
||||
|
@ -3,7 +3,7 @@ output: .retype
|
||||
url: https://pocketpy.dev
|
||||
branding:
|
||||
title: pocketpy
|
||||
label: v1.2.7
|
||||
label: v1.3.0
|
||||
logo: "./static/logo.png"
|
||||
favicon: "./static/logo.png"
|
||||
meta:
|
||||
|
@ -19,6 +19,9 @@ Optional = _PLACEHOLDER
|
||||
Callable = _PLACEHOLDER
|
||||
Type = _PLACEHOLDER
|
||||
|
||||
Iterable = _PLACEHOLDER
|
||||
Generator = _PLACEHOLDER
|
||||
|
||||
TypeVar = _PLACEHOLDER
|
||||
Self = _PLACEHOLDER
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user