C# 클래스 StdPaint.Vector2

A vector representing a point in 2D space.
파일 보기 프로젝트 열기: TheBerkin/StdPaint

공개 프로퍼티들

프로퍼티 타입 설명
X double
Y double

공개 메소드들

메소드 설명
Distance ( Vector2 a, Vector2 b ) : double

Returns the distance between two vectors.

DistanceSquared ( Vector2 a, Vector2 b ) : double

Returns the squared distance between two vectors.

Dot ( Vector2 a, Vector2 b ) : double

Returns the dot product of two vectors.

FromPoint ( Point point ) : Vector2

Create a new Vector2 from a Point object.

Normalize ( Vector2 vector ) : Vector2

Returns the normalized version of a vector.

ToPoint ( ) : Point

Create a new Point from the Vector2.

Vector2 ( double x, double y ) : System

Create a new Vector2 from coordinates.

Vector2 ( int x, int y ) : System

Create a new Vector2 from coordinates.

operator ( ) : Vector2

Multiplies two vectors.

메소드 상세

Distance() 공개 정적인 메소드

Returns the distance between two vectors.
public static Distance ( Vector2 a, Vector2 b ) : double
a Vector2 The first vector.
b Vector2 The second vector.
리턴 double

DistanceSquared() 공개 정적인 메소드

Returns the squared distance between two vectors.
public static DistanceSquared ( Vector2 a, Vector2 b ) : double
a Vector2 The first vector.
b Vector2 The second vector.
리턴 double

Dot() 공개 정적인 메소드

Returns the dot product of two vectors.
public static Dot ( Vector2 a, Vector2 b ) : double
a Vector2 The first vector.
b Vector2 The second vector.
리턴 double

FromPoint() 공개 정적인 메소드

Create a new Vector2 from a Point object.
public static FromPoint ( Point point ) : Vector2
point Point The Point object to create the Vector2 from.
리턴 Vector2

Normalize() 공개 정적인 메소드

Returns the normalized version of a vector.
public static Normalize ( Vector2 vector ) : Vector2
vector Vector2 The vector to normalize.
리턴 Vector2

ToPoint() 공개 메소드

Create a new Point from the Vector2.
public ToPoint ( ) : Point
리턴 Point

Vector2() 공개 메소드

Create a new Vector2 from coordinates.
public Vector2 ( double x, double y ) : System
x double The X coordinate.
y double The Y coordinate.
리턴 System

Vector2() 공개 메소드

Create a new Vector2 from coordinates.
public Vector2 ( int x, int y ) : System
x int The X coordinate.
y int The Y coordinate.
리턴 System

operator() 공개 정적인 메소드

Multiplies two vectors.
public static operator ( ) : Vector2
리턴 Vector2

프로퍼티 상세

X 공개적으로 프로퍼티

The X coordinate.
public double X
리턴 double

Y 공개적으로 프로퍼티

The Y coordinate.
public double Y
리턴 double