我在 actionscript 中创建了这个类,它返回给定的贝塞尔曲线点。而我想要实现的是获得当前点的角度。我在互联网上搜索,但找不到太多。我怎样才能做到这一点?
public static function quadraticBezierPoint(u:Number, anchor1:Point, anchor2:Point, control:Point):Point {
var uc:Number = 1 - u;
var posx:Number = Math.pow(uc, 2) * anchor1.x + 2 * uc * u * control.x + Math.pow(u, 2) * anchor2.x;
var posy:Number = Math.pow(uc, 2) * anchor1.y + 2 * uc * u * control.y + Math.pow(u, 2) * anchor2.y;
return new Point(posx, posy);
}