[][src]Function cdshealpix::nside_square

pub fn nside_square(delta_depth: u8) -> u64

Returns, for the given difference of depth, the number of cells small cells the large cell contains. If the small cell level is 0, the result is the sqaured nside.

Input

  • delta_depth must be in [0, 29]

Output

  • nside^2 = 2^2*delta_depth

Panics

If delta_depth is not in [0, 29].

Examples

use cdshealpix::{nside_square};
 
for delta_depth in 0..29_u8 {
    assert_eq!(2u64.pow(2 * delta_depth as u32), nside_square(delta_depth));
}