新增visiblityComputer 表示从给定的一组遮挡物的原点可以看到哪些区域
This commit is contained in:
@@ -88,6 +88,10 @@ module es {
|
||||
return Math.atan2(to.y - from.y, to.x - from.x);
|
||||
}
|
||||
|
||||
public static angleToVector(angleRadians: number, length: number){
|
||||
return new Vector2(Math.cos(angleRadians) * length, Math.sin(angleRadians) * length);
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加t并确保它总是大于或等于0并且小于长度
|
||||
* @param t
|
||||
|
||||
Reference in New Issue
Block a user