public class Vector extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
Vector |
add(Vector other) |
Vector |
addToSelf(Vector other) |
float |
cosine(Vector other)
夹角的余弦
|
float |
cosineForUnitVector(Vector other)
夹角的余弦
认为this和other都是单位向量,所以方法内部没有除以两者的模。 |
Vector |
divideToSelf(float f) |
Vector |
divideToSelf(int n) |
float |
dot(Vector other) |
Vector |
minus(Vector other) |
float |
norm() |
Vector |
normalize()
自身归一化
|
int |
size() |
public int size()
public float dot(Vector other)
public float norm()
public float cosineForUnitVector(Vector other)
other - public float cosine(Vector other)
other - public Vector divideToSelf(int n)
public Vector divideToSelf(float f)
public Vector normalize()
Copyright © 2014–2017 码农场. All rights reserved.