mirror of
https://gitee.com/open-visual/face-search.git
synced 2025-07-25 19:41:42 +08:00
update:2.0.0版本,当前版本用于支持opensearch
This commit is contained in:
parent
8fd8338e2a
commit
9a13983a8a
@ -123,9 +123,9 @@ public class FaceInfo implements Comparable<FaceInfo>, Serializable {
|
||||
* @return 旋转后的角
|
||||
*/
|
||||
public Point rotation(Point center, float angle){
|
||||
double k = new Float(Math.toRadians(angle));
|
||||
float nx1 = new 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);
|
||||
double k = Math.toRadians(angle);
|
||||
float nx1 = (float) ((this.x - center.x) * Math.cos(k) + (this.y - center.y) * Math.sin(k) + center.x);
|
||||
float ny1 = (float) (-(this.x - center.x) * Math.sin(k) + (this.y - center.y) * Math.cos(k) + center.y);
|
||||
return new Point(nx1, ny1);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user