目录

Vector2

Class Info

public class Vector2 implements Parcelable

二维向量。

Public Field Summary

Qualifier and Type

Field and Description

float

x

二维向量x值。

float

y

二维向量y值。

Public Constructor Summary

Constructor Name

Vector2()

无参构造方法。

Vector2(float x, float y)

构造方法,使用X、Y值进行初始化Vector2。

Vector2(Vector2 other)

构造方法,使用其他二维向量初始化Vector2。

Public Method Summary

Qualifier and Type

Method Name and Description

void

setValue(float x, float y)

设置二维向量X、Y值。

Public Fields

[h2]x

Property

public float x

二维向量x值。

[h2]y

Property

public float y

二维向量y值。

Public Constructors

[h2]Vector2()

Constructor

public Vector2()

无参构造方法。

[h2]Vector2(float x, float y)

Constructor

public Vector2(float x, float y)

使用X、Y值进行初始化。

Parameters

Name

Description

x

二维向量的X值。

y

二维向量的Y值。

[h2]Vector2(Vector2 other)

Constructor

public Vector2(Vector2 other)

使用其他二维向量初始化。

Parameters

Name

Description

other

其他二维向量。

Public Methods

[h2]setValue

Method

public void setValue(float x, float y)

设置二维向量的X、Y值。

Parameters

Name

Description

x

二维向量的X值。

y

二维向量的Y值。