C# Class Accord.Math.Vector4

显示文件 Open project: accord-net/framework

Public Properties

Property Type Description
W float
X float
Y float
Z float

Public Methods

Method Description
Abs ( ) : Vector4

Calculate absolute values of the vector.

Add ( Vector4 vector1, Vector4 vector2 ) : Vector4

Adds corresponding coordinates of two vectors.

Add ( Vector4 vector, float value ) : Vector4

Adds a value to all coordinates of the specified vector.

Divide ( Vector4 vector1, Vector4 vector2 ) : Vector4

Divides corresponding coordinates of two vectors.

Divide ( Vector4 vector, float factor ) : Vector4

Divides coordinates of the specified vector by the specified factor.

Dot ( Vector4 vector1, Vector4 vector2 ) : float

Calculates dot product of two vectors.

Equals ( Object obj ) : bool

Tests whether the vector equals to the specified object.

Equals ( Vector4 vector ) : bool

Tests whether the vector equals to the specified one.

GetHashCode ( ) : int

Returns the hashcode for this instance.

Inverse ( ) : Vector4

Inverse the vector.

Multiply ( Vector4 vector1, Vector4 vector2 ) : Vector4

Multiplies corresponding coordinates of two vectors.

Multiply ( Vector4 vector, float factor ) : Vector4

Multiplies coordinates of the specified vector by the specified factor.

Normalize ( ) : float

Normalizes the vector by dividing it’s all coordinates with the vector's norm.

Subtract ( Vector4 vector1, Vector4 vector2 ) : Vector4

Subtracts corresponding coordinates of two vectors.

Subtract ( Vector4 vector, float value ) : Vector4

Subtracts a value from all coordinates of the specified vector.

ToArray ( ) : float[]

Returns array representation of the vector.

ToString ( ) : string

Returns a string representation of this object.

ToVector3 ( ) : Vector3

Converts the vector to a 3D vector.

Vector4 ( float value ) : System

Initializes a new instance of the Vector4 structure.

Vector4 ( float x, float y, float z, float w ) : System

Initializes a new instance of the Vector4 structure.

operator ( ) : Vector4

Adds corresponding coordinates of two vectors.

operator ( ) : bool

Tests whether two specified vectors are equal.

Method Details

Abs() public method

Calculate absolute values of the vector.
public Abs ( ) : Vector4
return Vector4

Add() public static method

Adds corresponding coordinates of two vectors.
public static Add ( Vector4 vector1, Vector4 vector2 ) : Vector4
vector1 Vector4 The vector to add to.
vector2 Vector4 The vector to add to the first vector.
return Vector4

Add() public static method

Adds a value to all coordinates of the specified vector.
public static Add ( Vector4 vector, float value ) : Vector4
vector Vector4 Vector to add the specified value to.
value float Value to add to all coordinates of the vector.
return Vector4

Divide() public static method

Divides corresponding coordinates of two vectors.
public static Divide ( Vector4 vector1, Vector4 vector2 ) : Vector4
vector1 Vector4 The first vector to divide.
vector2 Vector4 The second vector to devide.
return Vector4

Divide() public static method

Divides coordinates of the specified vector by the specified factor.
public static Divide ( Vector4 vector, float factor ) : Vector4
vector Vector4 Vector to divide coordinates of.
factor float Factor to divide coordinates of the specified vector by.
return Vector4

Dot() public static method

Calculates dot product of two vectors.
public static Dot ( Vector4 vector1, Vector4 vector2 ) : float
vector1 Vector4 First vector to use for dot product calculation.
vector2 Vector4 Second vector to use for dot product calculation.
return float

Equals() public method

Tests whether the vector equals to the specified object.
public Equals ( Object obj ) : bool
obj Object The object to test equality with.
return bool

Equals() public method

Tests whether the vector equals to the specified one.
public Equals ( Vector4 vector ) : bool
vector Vector4 The vector to test equality with.
return bool

GetHashCode() public method

Returns the hashcode for this instance.
public GetHashCode ( ) : int
return int

Inverse() public method

Inverse the vector.
public Inverse ( ) : Vector4
return Vector4

Multiply() public static method

Multiplies corresponding coordinates of two vectors.
public static Multiply ( Vector4 vector1, Vector4 vector2 ) : Vector4
vector1 Vector4 The first vector to multiply.
vector2 Vector4 The second vector to multiply.
return Vector4

Multiply() public static method

Multiplies coordinates of the specified vector by the specified factor.
public static Multiply ( Vector4 vector, float factor ) : Vector4
vector Vector4 Vector to multiply coordinates of.
factor float Factor to multiple coordinates of the specified vector by.
return Vector4

Normalize() public method

Normalizes the vector by dividing it’s all coordinates with the vector's norm.
public Normalize ( ) : float
return float

Subtract() public static method

Subtracts corresponding coordinates of two vectors.
public static Subtract ( Vector4 vector1, Vector4 vector2 ) : Vector4
vector1 Vector4 The vector to subtract from.
vector2 Vector4 The vector to subtract from the first vector.
return Vector4

Subtract() public static method

Subtracts a value from all coordinates of the specified vector.
public static Subtract ( Vector4 vector, float value ) : Vector4
vector Vector4 Vector to subtract the specified value from.
value float Value to subtract from all coordinates of the vector.
return Vector4

ToArray() public method

Returns array representation of the vector.
public ToArray ( ) : float[]
return float[]

ToString() public method

Returns a string representation of this object.
public ToString ( ) : string
return string

ToVector3() public method

Converts the vector to a 3D vector.
public ToVector3 ( ) : Vector3
return Vector3

Vector4() public method

Initializes a new instance of the Vector4 structure.
public Vector4 ( float value ) : System
value float Value, which is set to all 4 coordinates of the vector.
return System

Vector4() public method

Initializes a new instance of the Vector4 structure.
public Vector4 ( float x, float y, float z, float w ) : System
x float X coordinate of the vector.
y float Y coordinate of the vector.
z float Z coordinate of the vector.
w float W coordinate of the vector.
return System

operator() public static method

Adds corresponding coordinates of two vectors.
public static operator ( ) : Vector4
return Vector4

operator() public static method

Tests whether two specified vectors are equal.
public static operator ( ) : bool
return bool

Property Details

W public_oe property

W coordinate of the vector.
public float W
return float

X public_oe property

X coordinate of the vector.
public float X
return float

Y public_oe property

Y coordinate of the vector.
public float Y
return float

Z public_oe property

Z coordinate of the vector.
public float Z
return float