limelight

This commit is contained in:
Antoine PerreaultE
2026-03-30 17:53:54 -04:00
parent f7e88619e9
commit 6afc342006
3 changed files with 32 additions and 14 deletions

View File

@@ -62,10 +62,10 @@ NetworkTable table = NetworkTableInstance.getDefault().getTable("limelight-tag")
}
else{
if(y1 > y2){
return Math.atan(90-((x2 - x1) / (y2 - y1)))* (180 / Math.PI)+270 - angle;
return Math.atan((x2 - x1) / (y2 - y1))* (180 / Math.PI)+270 - angle;
}
else{
return Math.atan((x2 - x1) / (y2 - y1)) * (180 / Math.PI)+180 - angle;
return Math.atan(90-((x2 - x1) / (y2 - y1))) * (180 / Math.PI)+180 - angle;
}
}
}