TouchVG framework
Vector2d
add
angle
angle2
angledVector
angleTo
angleTo2
crossProduct
distanceToVector
dotProduct
get
isCodirectionalTo
isCodirectionalTo
isDegenerate
isEqualTo
isLeftOf
isOppositeTo
isOppositeTo
isParallelTo
isParallelTo
isPerpendicularTo
isPerpendicularTo
isRightOf
isUnitVector
isZeroVector
kIdentity
kXAxis
kYAxis
length
lengthSquare
negate
normalize
operator!=
operator*
operator*
operator*
operator*
operator*
operator*=
operator*=
operator+
operator+=
operator-
operator-
operator-=
operator/
operator/
operator/=
operator==
perpVector
projectResolveVector
projectScaleToVector
resolveVector
resolveVector
scaleBy
scaleBy
scaledVector
set
set
setAngleLength
setLength
subtract
transform
unitVector
Vector2d
Vector2d
Vector2d
x
y
◆
isUnitVector()
bool Vector2d::isUnitVector
(
const
Tol
&
tol
=
Tol::gTol
()
)
const
判断是否是单位矢量
如果本矢量的长度和1相差小于长度容差,则也为单位矢量
参数
tol
判断的容差,用到其长度容差
返回
如果本矢量为单位矢量,则返回true,否则返回false
函数调用图:
通用矢量图形框架
, 版权所有 (C)
张云贵
2004-2017,BSD 开源许可证