lib.geometry package

Submodules

lib.geometry.vec2 module

ベクトル演算の実装

class lib.geometry.vec2.Vec2(x: float, y: float)

ベースクラス: object

2次元ベクトルを表すクラス .. attribute:: x

x座標

type:

float

y

y座標

Type:

float

cross(other: Vec2) float

外積を計算する(2Dではスカラー値)

dot(other: Vec2) float

ドット積を計算する

norm() float

ベクトルのノルムを返す

norm2() float

ベクトルのノルムの二乗を返す

normalize() Vec2

ベクトルを正規化する

x() float
y() float

Module contents