---
Product: Aspose.3D
Platform: typescript
Page Type: reference
Canonical URL: https://reference.aspose.org/3d/typescript/FVector2
---

# FVector2

## Overview

`FVector2` is a class in Aspose.3D FOSS for Typescript.

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

This class provides 11 methods for working with FVector2 objects in Typescript programs.
Available methods include: `add`, `constructor`, `div`, `dot`, `equals`, `length`, `mul`, `normalize`, `parse`, `sub`, `toString`.
All public members are accessible to any Typescript application after installing the Aspose.3D FOSS for Typescript package.
Properties: `x`, `y`.

## Description

`FVector2` is a class in the Aspose.3D FOSS library for TypeScript that exposes 10 methods and 2 properties for programmatic use.

Core capabilities include: `number`; `number`; creates a new vector with the specified x and y components. These operations enable developers to integrate fvector2 functionality directly into TypeScript applications.

Instances are created through a single constructor that initializes the object with default values.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `x` | `number` | Read/Write | Gets the x. |
| `y` | `number` | Read/Write | Gets the y. |

## Methods

| Signature | Description |
|-----------|-------------|
| `constructor(x: number, y: number)` | Creates a new vector with the specified x and y components |
| `toString()` → `string` | Returns a string representation of the vector in the form "(x, y)" |
| `equals(other: FVector2)` → `boolean` | Returns true if the other vector has identical x and y values |
| `add(other: FVector2)` → `FVector2` | Returns a new FVector2 that is the component‑wise sum of this vector and the other |
| `sub(other: FVector2)` → `FVector2` | Returns a new FVector2 that is the component‑wise difference between this vector and the other |
| `mul(scalar: number)` → `FVector2` | Returns a new FVector2 scaled by the given scalar |
| `div(scalar: number)` → `FVector2` | Returns a new FVector2 divided by the given scalar |
| `length()` → `number` |  |
| `normalize()` → `FVector2` | Returns a unit vector in the same direction as this vector |
| `dot(other: FVector2)` → `number` | Returns the dot product of this vector with the other vector |
| `parse(input: string)` → `FVector2` | Creates an FVector2 from a string containing two numeric components |

## See Also

- [Aspose.3D — Enterprise API Reference](https://reference.aspose.com/3d/)