# Vector2(ロブロックス データ型) > Represents a 2D value with direction and magnitude. - URL:https://roblox.minecraft-okinawa.com/reference/datatypes/Vector2/ - 公式:https://create.roblox.com/docs/reference/engine/datatypes/Vector2 ## コンストラクター - `Vector2.new(x: number, y: number)`:Returns a Vector2 from the given x and y components. ## プロパティ - `Vector2.X: number`:The x-coordinate of the Vector2. - `Vector2.Y: number`:The y-coordinate of the Vector2. - `Vector2.Magnitude: number`:The length of the Vector2. - `Vector2.Unit: Vector2`:A normalized copy of the Vector2. ## メソッド - `Vector2:Cross(other: Vector2): number`:Returns the cross product of the two vectors. - `Vector2:Abs(): Vector2`:Returns a new vector from the absolute values of the original's components. - `Vector2:Ceil(): Vector2`:Returns a new vector from the ceiling of the original's components. - `Vector2:Floor(): Vector2`:Returns a new vector from the floor of the original's components. - `Vector2:Sign(): Vector2`:Returns a new vector from the sign (-1, 0, or 1) of the original's components. - `Vector2:Angle(other: Vector2, isSigned: boolean): number`:Returns the angle in radians between the two vectors. - `Vector2:Dot(v: Vector2): number`:Returns a scalar dot product of the two vectors. - `Vector2:Lerp(v: Vector2, alpha: number): Vector2`:Returns a Vector2 linearly interpolated between this Vector2 and the given goal by the given alpha. - `Vector2:Max(others...: Tuple): Vector2`:Returns a Vector2 with each component as the highest among the respective components of the provided Vector2 objects. - `Vector2:Min(others...: Tuple): Vector2`:Returns a Vector2 with each component as the lowest among the respective components of the provided Vector2 objects. - `Vector2:FuzzyEq(other: Vector2, epsilon: number): bool`:Returns true if the X and Y components of the other Vector2 are within epsilon units of each corresponding component of this Vector2. 英語の説明とメンバー一覧:Roblox Creator Documentation(CC BY 4.0)。日本語の解説はこのサイト独自のものです。 執筆:鈴木孝昌(現役プロジェクトマネージャー/プログラミング講師)/運営:沖縄マイクラ部 プログラミングスクール「クロスウェーブ」(https://minecraft-okinawa.com/)