FVector2

Overview

FVector2 是一个类在Aspose.3D FOSS for Typescript中.

FVector2.constructor creates a new vector with the specified x and y components.

本类提供11种方法,用于在TypeScript程序中使用FVector2对象. 有的方法包括: add, constructor, div, dot, equals, length, mul, normalize, parse, sub, toString. 在安装Aspose.3D FOSS for Typescript 包后,所有公众成员都可以访问任何TypeScript应用程序. 特性: x, y.

Description

FVector2 是Aspose.3D FOSS库中一个类,该类可用于 TypeScript 进行编程使用.

核心能力包括: number; number; 创建一个新的向量,指定了x和y组件.这些操作使开发人员能够直接将fvector2功能集成到TypeScript应用程序中.

实例通过单个构造器创建,该构成者将对象初始化为默认值.

Properties

NameTypeAccessDescription
xnumber阅读/写作得到了x.
ynumber阅读/写作得到了y.

Methods

SignatureDescription
constructor(x: number, y: number)创建一个新的向量,指定了x和y组件.
toString()string返回一个字符串的向量表示形式"(x,y) "
equals(other: FVector2)boolean如果其他向量具有相同的x和y值,则返回true.
add(other: FVector2)FVector2返回一个新的FVector2,即这个向量和其他的组件总数.
sub(other: FVector2)FVector2返回一个新的FVector2,即这个向量与其他向量的组件差异.
mul(scalar: number)FVector2返回一个新的FVector2按给定的尺度调整的值.
div(scalar: number)FVector2返回一个新的FVector2 分成给定的尺度数
length()number
normalize()FVector2返回一个单位向量与这个向量的相同方向.
dot(other: FVector2)number返回这个向量与另一个向量的点乘法.
parse(input: string)FVector2从包含两个数组件的字符串中创建一个FVector2

See Also

 中文