Skip to content

Commit b72d8e4

Browse files
committed
Update CHANGELOG
1 parent 426774c commit b72d8e4

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ libpython/target/
1212
libpython/*.so
1313

1414
# Ignore files
15+
NOTICE.md
1516
Notes.txt
1617
GIT_NOTICE.txt
1718
RELEASE_NOTICE.md

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Released 2024-05-14
66

77
### Add
88

9+
* Add `projected_vertices` (external contribution)
910
* Add a test on polygon (because of a bug in the Java lib, but already fixed in the Rust lib).
1011

1112
### Bug correction

src/nested/mod.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,11 +1270,12 @@ impl Layer {
12701270
#[inline]
12711271
pub fn vertices(&self, hash: u64) -> [(f64, f64); 4] {
12721272
let (x, y) = self.center_of_projected_cell(hash);
1273+
let t = self.one_over_nside;
12731274
[
1274-
super::unproj(x, y - self.one_over_nside), // S
1275-
super::unproj(x + self.one_over_nside, y), // E
1276-
super::unproj(x, y + self.one_over_nside), // N
1277-
super::unproj(ensures_x_is_positive(x - self.one_over_nside), y), // W
1275+
super::unproj(x, y - t), // S
1276+
super::unproj(x + t, y), // E
1277+
super::unproj(x, y + t), // N
1278+
super::unproj(ensures_x_is_positive(x - t), y), // W
12781279
]
12791280
}
12801281

@@ -1290,14 +1291,14 @@ impl Layer {
12901291
/// # Panics
12911292
/// If the given `hash` value is not in `[0, 12*nside^2[`, this method panics.
12921293
#[inline]
1293-
pub fn projected_vertices(&self, hash:u64) -> [(f64, f64); 4] {
1294-
let (x,y) = self.center_of_projected_cell(hash);
1294+
pub fn projected_vertices(&self, hash: u64) -> [(f64, f64); 4] {
1295+
let (x, y) = self.center_of_projected_cell(hash);
12951296
let t = self.one_over_nside;
12961297
[
1297-
(x, y - t), // S
1298-
(x + t, y), // E
1299-
(x, y + t), // N
1300-
(x - t, y), // W
1298+
(x, y - t), // S
1299+
(x + t, y), // E
1300+
(x, y + t), // N
1301+
(x - t, y), // W
13011302
]
13021303
}
13031304

0 commit comments

Comments
 (0)