mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
...
This commit is contained in:
parent
979b7f4a67
commit
5081935735
@ -132,7 +132,7 @@ from typing import Generic, TypeVar
|
||||
|
||||
T = TypeVar('T')
|
||||
|
||||
class _struct_like(Generic[T]):
|
||||
class StructLike(Generic[T]):
|
||||
def to_struct(self) -> struct: ...
|
||||
@classmethod
|
||||
def from_struct(cls, s: struct) -> T: ...
|
||||
|
@ -1,7 +1,7 @@
|
||||
from typing import overload
|
||||
from c import _struct_like
|
||||
from c import StructLike
|
||||
|
||||
class vec2(_struct_like['vec2']):
|
||||
class vec2(StructLike['vec2']):
|
||||
x: float
|
||||
y: float
|
||||
|
||||
@ -18,7 +18,7 @@ class vec2(_struct_like['vec2']):
|
||||
def rotate(self, radians: float) -> vec2: ...
|
||||
def rotate_(self, radians: float) -> None: ...
|
||||
|
||||
class vec3(_struct_like['vec3']):
|
||||
class vec3(StructLike['vec3']):
|
||||
x: float
|
||||
y: float
|
||||
z: float
|
||||
@ -34,7 +34,7 @@ class vec3(_struct_like['vec3']):
|
||||
def length_squared(self) -> float: ...
|
||||
def normalize(self) -> vec3: ...
|
||||
|
||||
class vec4(_struct_like['vec4']):
|
||||
class vec4(StructLike['vec4']):
|
||||
x: float
|
||||
y: float
|
||||
z: float
|
||||
@ -50,7 +50,7 @@ class vec4(_struct_like['vec4']):
|
||||
def length_squared(self) -> float: ...
|
||||
def normalize(self) -> vec4: ...
|
||||
|
||||
class mat3x3(_struct_like['mat3x3']):
|
||||
class mat3x3(StructLike['mat3x3']):
|
||||
_11: float
|
||||
_12: float
|
||||
_13: float
|
||||
|
Loading…
x
Reference in New Issue
Block a user