元編程參考文件

二維向量

17 個節點

本頁內容 17

X 分量

函數

The X coordinate.

簽名
X 分量(Vector 2D: Vector 2D) -> 數字
double X(Vector2D Vector 2D)

參數

名稱型別預設值說明
Vector 2DVector 2D—

返回

結果數字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
二維向量
所屬包
影像處理

Y 分量

函數

The Y coordinate.

簽名
Y 分量(Vector 2D: Vector 2D) -> 數字
double Y(Vector2D Vector 2D)

參數

名稱型別預設值說明
Vector 2DVector 2D—

返回

結果數字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
二維向量
所屬包
影像處理

零向量

函數

Gets a Types.Vector2D that has all of its values set to zero.

簽名
零向量() -> Vector 2D
Vector2D Zero()

返回

結果Vector 2D
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
二維向量
所屬包
影像處理

二維向量

函數

過載 1/2

簽名
二維向量(X: 數字, Y: 數字) -> Vector 2D
Vector2D Vector2D(double x, double y)

Initializes a new instance of the Types.Vector2D struct with the specified coordinates.

參數

名稱型別預設值說明
X數字—The X coordinate.
Y數字—The Y coordinate.

返回

二維向量Vector 2D

備註

Marked for JSON so that a serializer can rebuild one. Vector2D.X and Vector2D.Y are readonly
*fields*, which a serializer can read but cannot assign, so without a constructor to call every
deserialized vector came back as (0, 0) - which, since node positions are vectors, silently collapsed
a whole document's layout onto the origin.

過載 2/2

簽名
二維向量(V: Vector2) -> Vector 2D
Vector2D Vector2D(Vector2 v)

Initializes a new instance of the Types.Vector2D struct using a Numerics.Vector2.

參數

名稱型別預設值說明
VVector2—A Numerics.Vector2 instance from which to initialize the coordinates.

返回

二維向量Vector 2D
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
二維向量
所屬包
影像處理

長度

函數

Gets the length (magnitude) of the vector.

簽名
長度(Vector 2D: Vector 2D) -> 數字
double Length(Vector2D Vector 2D)

參數

名稱型別預設值說明
Vector 2DVector 2D—

返回

結果數字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
二維向量
所屬包
影像處理

長度平方

函數

Calculates the square of the vector's length.

簽名
長度平方(Vector 2D: Vector 2D) -> 數字
double LengthSquared(Vector2D Vector 2D)

參數

名稱型別預設值說明
Vector 2DVector 2D—

返回

結果數字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
二維向量
所屬包
影像處理

轉為文字

函數

此節點沒有文件說明。

簽名
轉為文字(Vector 2D: Vector 2D) -> 文字
string ToString(Vector2D Vector 2D)

參數

名稱型別預設值說明
Vector 2DVector 2D—

返回

結果文字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
二維向量
所屬包
影像處理

距離平方

函數

Calculates the square of the distance between two vectors.

簽名
距離平方(A: Vector 2D, B: Vector 2D) -> 數字
double DistanceSquared(Vector2D a, Vector2D b)

參數

名稱型別預設值說明
AVector 2D—The first Types.Vector2D.
BVector 2D—The second Types.Vector2D.

返回

結果數字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
二維向量
所屬包
影像處理

點積

函數

Calculates the dot product of two vectors.

簽名
點積(A: Vector 2D, B: Vector 2D) -> 數字
double Dot(Vector2D a, Vector2D b)

參數

名稱型別預設值說明
AVector 2D—The first Types.Vector2D.
BVector 2D—The second Types.Vector2D.

返回

結果數字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
二維向量
所屬包
影像處理

加法運算

函數

Adds two Types.Vector2D instances.

簽名
加法運算(A: Vector 2D, B: Vector 2D) -> Vector 2D
Vector2D op_Addition(Vector2D a, Vector2D b)

參數

名稱型別預設值說明
AVector 2D—The first Types.Vector2D.
BVector 2D—The second Types.Vector2D.

返回

結果Vector 2D
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
二維向量
所屬包
影像處理

除法運算

函數

Divides a Types.Vector2D by a scalar.

簽名
除法運算(A: Vector 2D, B: 數字) -> Vector 2D
Vector2D op_Division(Vector2D a, double b)

參數

名稱型別預設值說明
AVector 2D—The Types.Vector2D to divide.
B數字—The scalar value.

返回

結果Vector 2D
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
二維向量
所屬包
影像處理

相等運算

函數

Compares two Types.Vector2D instances for equality.

簽名
相等運算(A: Vector 2D, B: Vector 2D) -> 真否
bool op_Equality(Vector2D a, Vector2D b)

參數

名稱型別預設值說明
AVector 2D—The first Types.Vector2D.
BVector 2D—The second Types.Vector2D.

返回

結果真否
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
二維向量
所屬包
影像處理

不等運算

函數

Compares two Types.Vector2D instances for inequality.

簽名
不等運算(A: Vector 2D, B: Vector 2D) -> 真否
bool op_Inequality(Vector2D a, Vector2D b)

參數

名稱型別預設值說明
AVector 2D—The first Types.Vector2D.
BVector 2D—The second Types.Vector2D.

返回

結果真否
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
二維向量
所屬包
影像處理

乘法運算

函數

過載 1/2

簽名
乘法運算(A: Vector 2D, B: 數字) -> Vector 2D
Vector2D op_Multiply(Vector2D a, double b)

Multiplies a Types.Vector2D by a scalar.

參數

名稱型別預設值說明
AVector 2D—The Types.Vector2D to multiply.
B數字—The scalar value.

返回

結果Vector 2D

過載 2/2

簽名
乘法運算(A: 數字, B: Vector 2D) -> Vector 2D
Vector2D op_Multiply(double a, Vector2D b)

Multiplies a scalar by a Types.Vector2D.

參數

名稱型別預設值說明
A數字—The scalar value.
BVector 2D—The Types.Vector2D to multiply.

返回

結果Vector 2D
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
二維向量
所屬包
影像處理

減法運算

函數

Subtracts one Types.Vector2D from another.

簽名
減法運算(A: Vector 2D, B: Vector 2D) -> Vector 2D
Vector2D op_Subtraction(Vector2D a, Vector2D b)

參數

名稱型別預設值說明
AVector 2D—The first Types.Vector2D.
BVector 2D—The second Types.Vector2D to subtract from the first.

返回

結果Vector 2D
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
二維向量
所屬包
影像處理

取負運算

函數

Negates a Types.Vector2D.

簽名
取負運算(A: Vector 2D) -> Vector 2D
Vector2D op_UnaryNegation(Vector2D a)

參數

名稱型別預設值說明
AVector 2D—The Types.Vector2D to negate.

返回

結果Vector 2D
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
二維向量
所屬包
影像處理

解析元組

函數

此節點沒有文件說明。

簽名
解析元組(元組: 文字) -> Vector 2D
Vector2D ParseTuple(string tuple)

參數

名稱型別預設值說明
元組文字—

返回

結果Vector 2D
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
二維向量
所屬包
影像處理