C# 클래스 Axiom.Math.Vector2

파일 보기 프로젝트 열기: WolfgangSt/axiom 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
x Real

공개 메소드들

메소드 설명
Add ( Vector2 left, Vector2 right ) : Vector2

Used when a Vector2 is added to another Vector2.

Cross ( Vector2 vector ) : Real

Calculates the 2 dimensional cross-product of 2 vectors, which results in a Real value which is 2 times the area of the triangle defined by the two vectors. It also is the magnitude of the 3D vector that is perpendicular to the 2D vectors if the 2D vectors are projected to 3D space.

Dot ( Vector2 vector ) : Real

Calculates the 2 dimensional dot-product of 2 vectors, which is equal to the cosine of the angle between the vectors, times the lengths of each of the vectors. A.Dot(B) == |A| * |B| * cos(fi)

Equals ( object obj ) : bool
GetHashCode ( ) : int
Multiply ( Real scalar, Vector2 right ) : Vector2

Used when a scalar value is multiplied by a Vector2.

Multiply ( Vector2 left, Real scalar ) : Vector2

Used when a Vector2 is multiplied by a scalar value.

Negate ( Vector2 left ) : Vector2

Used to negate the elements of a vector.

Normalize ( ) : Real

Normalizes the vector.

This method normalises the vector such that it's length / magnitude is 1. The result is called a unit vector.

This function will not crash for zero-sized vectors, but there will be no changes made to their components.

Parse ( string s ) : Vector2
Subtract ( Vector2 left, Vector2 right ) : Vector2

Used to subtract a Vector2 from another Vector2.

ToNormalized ( ) : Vector2

Gets a normalized (unit length) vector of this vector

ToString ( ) : string
Vector2 ( Real x, Real y ) : System

Constructor.

operator ( ) : Vector2

Used when a Vector2 is added to another Vector2.

operator ( ) : bool

메소드 상세

Add() 공개 정적인 메소드

Used when a Vector2 is added to another Vector2.
public static Add ( Vector2 left, Vector2 right ) : Vector2
left Vector2
right Vector2
리턴 Vector2

Cross() 공개 메소드

Calculates the 2 dimensional cross-product of 2 vectors, which results in a Real value which is 2 times the area of the triangle defined by the two vectors. It also is the magnitude of the 3D vector that is perpendicular to the 2D vectors if the 2D vectors are projected to 3D space.
public Cross ( Vector2 vector ) : Real
vector Vector2
리턴 Real

Dot() 공개 메소드

Calculates the 2 dimensional dot-product of 2 vectors, which is equal to the cosine of the angle between the vectors, times the lengths of each of the vectors. A.Dot(B) == |A| * |B| * cos(fi)
public Dot ( Vector2 vector ) : Real
vector Vector2
리턴 Real

Equals() 공개 메소드

public Equals ( object obj ) : bool
obj object
리턴 bool

GetHashCode() 공개 메소드

public GetHashCode ( ) : int
리턴 int

Multiply() 공개 정적인 메소드

Used when a scalar value is multiplied by a Vector2.
public static Multiply ( Real scalar, Vector2 right ) : Vector2
scalar Real
right Vector2
리턴 Vector2

Multiply() 공개 정적인 메소드

Used when a Vector2 is multiplied by a scalar value.
public static Multiply ( Vector2 left, Real scalar ) : Vector2
left Vector2
scalar Real
리턴 Vector2

Negate() 공개 정적인 메소드

Used to negate the elements of a vector.
public static Negate ( Vector2 left ) : Vector2
left Vector2
리턴 Vector2

Normalize() 공개 메소드

Normalizes the vector.
This method normalises the vector such that it's length / magnitude is 1. The result is called a unit vector.

This function will not crash for zero-sized vectors, but there will be no changes made to their components.

public Normalize ( ) : Real
리턴 Real

Parse() 공개 메소드

public Parse ( string s ) : Vector2
s string
리턴 Vector2

Subtract() 공개 정적인 메소드

Used to subtract a Vector2 from another Vector2.
public static Subtract ( Vector2 left, Vector2 right ) : Vector2
left Vector2
right Vector2
리턴 Vector2

ToNormalized() 공개 메소드

Gets a normalized (unit length) vector of this vector
public ToNormalized ( ) : Vector2
리턴 Vector2

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

Vector2() 공개 메소드

Constructor.
public Vector2 ( Real x, Real y ) : System
x Real X position.
y Real Y position
리턴 System

operator() 공개 정적인 메소드

Used when a Vector2 is added to another Vector2.
public static operator ( ) : Vector2
리턴 Vector2

operator() 공개 정적인 메소드

public static operator ( ) : bool
리턴 bool

프로퍼티 상세

x 공개적으로 프로퍼티

public Real x
리턴 Real