jiayuasu commented on code in PR #60:
URL: 
https://github.com/apache/sedona-spatialbench/pull/60#discussion_r2512136293


##########
spatialbench/src/spatial/utils/antimeridian.rs:
##########
@@ -0,0 +1,258 @@
+use geo::{Centroid, LineString, Polygon};
+
+/// Wraps a longitude value to ensure it stays within the valid range of 
[-180, 180] degrees.
+///
+/// Longitude is a circular coordinate:
+/// - If longitude exceeds 180°, it wraps around from the eastern hemisphere 
back to the western hemisphere.
+/// - If longitude is below -180°, it wraps around from the western hemisphere 
back to the eastern hemisphere.
+pub fn wrap_around_longitude(mut lon: f64) -> f64 {
+    while lon > 180.0 {

Review Comment:
   ok. can you update the comment to make this clear? Seems to be pretty 
confusing to me.



##########
spatialbench/src/spatial/utils/antimeridian.rs:
##########
@@ -0,0 +1,258 @@
+use geo::{Centroid, LineString, Polygon};
+
+/// Wraps a longitude value to ensure it stays within the valid range of 
[-180, 180] degrees.
+///
+/// Longitude is a circular coordinate:
+/// - If longitude exceeds 180°, it wraps around from the eastern hemisphere 
back to the western hemisphere.
+/// - If longitude is below -180°, it wraps around from the western hemisphere 
back to the eastern hemisphere.
+pub fn wrap_around_longitude(mut lon: f64) -> f64 {
+    while lon > 180.0 {

Review Comment:
   ok. can you update the code comment to make this clear? Seems to be pretty 
confusing to me.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to