FV2

Vue de l’ensemble

‘FVector2’ est une classe dans Aspose.3D FOSS pour Typescript.

Le constructeur FVector2 crée un nouveau vecteur avec les composants x et y spécifiés.

Cette classe fournit 11 méthodes pour travailler avec des objets FVector2 dans les programmes de type. Les méthodologies disponibles comprennent: ‘add’, ‘constructor’, div', ‘dot', ’equals’, 'longueur', ‚mul, ’normalize’, ‘‘parse’, ‘’sub , 'toString. Tous les membres publics sont accessibles à toute application de Type après l’installation du Aspose.3D FOSS pour le package de style. Propriétés : ‘x` et ‘y’.

Description

‘FVector2’ est une classe dans la bibliothèque Aspose.3D FOSS pour TypeScript qui expose 10 méthodes et 2 propriétés pour l’utilisation programmatique.

Les capacités de base comprennent : ’numéro’ ; ’nombre’; crée un nouveau vecteur avec les composants x et y spécifiés. Ces opérations permettent aux développeurs d’intégrer la fonctionnalité fvector2 directement dans les applications TypeScript.

Les instances sont créées à travers un constructeur unique qui initialisera l’objet avec des valeurs par défaut.

Propriétés

NameTypeAccessDescription
xnumberRead/WriteGets the x.
ynumberRead/WriteGets the y.

méthodes

SignatureDescription
constructor(x: number, y: number)Creates a new vector with the specified x and y components
toString()stringReturns a string representation of the vector in the form “(x, y)”
equals(other: FVector2)booleanReturns true if the other vector has identical x and y values
add(other: FVector2)FVector2Returns a new FVector2 that is the component‑wise sum of this vector and the other
sub(other: FVector2)FVector2Returns a new FVector2 that is the component‑wise difference between this vector and the other
mul(scalar: number)FVector2Returns a new FVector2 scaled by the given scalar
div(scalar: number)FVector2Returns a new FVector2 divided by the given scalar
length()number
normalize()FVector2Returns a unit vector in the same direction as this vector
dot(other: FVector2)numberReturns the dot product of this vector with the other vector
parse(input: string)FVector2Creates an FVector2 from a string containing two numeric components

Voir aussi

  • Aspose.3D - référence API d’entreprise
 Français