C# 클래스 Box2DX.Common.Vec2

A 2D column vector.
파일 보기 프로젝트 열기: danielpcox/Crisis-at-Swiss-Station 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
X float

공개 메소드들

메소드 설명
Cross ( Vec2 a, float s ) : Vec2

Perform the cross product on a vector and a scalar. In 2D this produces a vector.

Cross ( float s, Vec2 a ) : Vec2

Perform the cross product on a scalar and a vector. In 2D this produces a vector.

Cross ( Vec2 a, Vec2 b ) : float

Perform the cross product on two vectors. In 2D this produces a scalar.

Distance ( Vec2 a, Vec2 b ) : float
DistanceSquared ( Vec2 a, Vec2 b ) : float
Dot ( Vec2 a, Vec2 b ) : float

Peform the dot product on two vectors.

Length ( ) : float

Get the length of this vector (the norm).

LengthSquared ( ) : float

Get the length squared. For performance, use this instead of Length (if possible).

Normalize ( ) : float

Convert this vector into a unit vector. Returns the length.

Set ( float x, float y ) : void

Set this vector to some specified coordinates.

SetZero ( ) : void

Set this vector to all zeros.

Vec2 ( float x, float y ) : System

Construct using coordinates.

operator ( ) : Vec2
operator ( ) : bool

메소드 상세

Cross() 공개 정적인 메소드

Perform the cross product on a vector and a scalar. In 2D this produces a vector.
public static Cross ( Vec2 a, float s ) : Vec2
a Vec2
s float
리턴 Vec2

Cross() 공개 정적인 메소드

Perform the cross product on a scalar and a vector. In 2D this produces a vector.
public static Cross ( float s, Vec2 a ) : Vec2
s float
a Vec2
리턴 Vec2

Cross() 공개 정적인 메소드

Perform the cross product on two vectors. In 2D this produces a scalar.
public static Cross ( Vec2 a, Vec2 b ) : float
a Vec2
b Vec2
리턴 float

Distance() 공개 정적인 메소드

public static Distance ( Vec2 a, Vec2 b ) : float
a Vec2
b Vec2
리턴 float

DistanceSquared() 공개 정적인 메소드

public static DistanceSquared ( Vec2 a, Vec2 b ) : float
a Vec2
b Vec2
리턴 float

Dot() 공개 정적인 메소드

Peform the dot product on two vectors.
public static Dot ( Vec2 a, Vec2 b ) : float
a Vec2
b Vec2
리턴 float

Length() 공개 메소드

Get the length of this vector (the norm).
public Length ( ) : float
리턴 float

LengthSquared() 공개 메소드

Get the length squared. For performance, use this instead of Length (if possible).
public LengthSquared ( ) : float
리턴 float

Normalize() 공개 메소드

Convert this vector into a unit vector. Returns the length.
public Normalize ( ) : float
리턴 float

Set() 공개 메소드

Set this vector to some specified coordinates.
public Set ( float x, float y ) : void
x float
y float
리턴 void

SetZero() 공개 메소드

Set this vector to all zeros.
public SetZero ( ) : void
리턴 void

Vec2() 공개 메소드

Construct using coordinates.
public Vec2 ( float x, float y ) : System
x float
y float
리턴 System

operator() 공개 정적인 메소드

public static operator ( ) : Vec2
리턴 Vec2

operator() 공개 정적인 메소드

public static operator ( ) : bool
리턴 bool

프로퍼티 상세

X 공개적으로 프로퍼티

public float X
리턴 float