update:2.0.0版本,当前版本用于支持opensearch

This commit is contained in:
divenswu 2022-11-23 16:03:22 +08:00
parent 8fd8338e2a
commit 9a13983a8a

View File

@ -123,9 +123,9 @@ public class FaceInfo implements Comparable<FaceInfo>, Serializable {
* @return 旋转后的角 * @return 旋转后的角
*/ */
public Point rotation(Point center, float angle){ public Point rotation(Point center, float angle){
double k = new Float(Math.toRadians(angle)); double k = Math.toRadians(angle);
float nx1 = new Float((this.x-center.x)*Math.cos(k) +(this.y-center.y)*Math.sin(k)+center.x); float nx1 = (float) ((this.x - center.x) * Math.cos(k) + (this.y - center.y) * Math.sin(k) + center.x);
float ny1 = new Float(-(this.x-center.x)*Math.sin(k) + (this.y-center.y)*Math.cos(k)+center.y); float ny1 = (float) (-(this.x - center.x) * Math.sin(k) + (this.y - center.y) * Math.cos(k) + center.y);
return new Point(nx1, ny1); return new Point(nx1, ny1);
} }