File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,8 +43,7 @@ export class CellUnion extends Array<CellID> implements Region {
4343 * @category Constructors
4444 */
4545 static fromUnion ( ...cellUnions : CellUnion [ ] ) : CellUnion {
46- const cu = new CellUnion ( )
47- for ( const cellUnion of cellUnions ) cu . push ( ...cellUnion )
46+ const cu = new CellUnion ( ...cellUnions . flat ( 1 ) )
4847 cu . normalize ( )
4948 return cu
5049 }
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export class LatLng {
2727 * Returns a LatLng for the coordinates given in degrees.
2828 * @category Constructors
2929 */
30- static fromDegrees ( lat : Angle , lng : Angle ) : LatLng {
30+ static fromDegrees ( lat : number , lng : number ) : LatLng {
3131 return new LatLng ( lat * DEGREE , lng * DEGREE )
3232 }
3333
Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ export class Point implements Region {
223223
224224 for ( let i = 0 ; i < numVertices ; i ++ ) {
225225 const angle = i * radianStep
226- const p = Point . fromVector ( new Vector ( r * Math . cos ( angle ) , r * Math . sin ( angle ) , z ) )
226+ const p = new Point ( r * Math . cos ( angle ) , r * Math . sin ( angle ) , z )
227227 vertices . push ( Point . fromVector ( fromFrame ( frame , p ) . vector . normalize ( ) ) )
228228 }
229229
Original file line number Diff line number Diff line change @@ -633,8 +633,6 @@ export const prevWrap = (ci: CellID): CellID => {
633633
634634/**
635635 * Returns the level of the common ancestor of the two S2 CellIDs.
636- * @param other The other CellID to compare with.
637- * @returns A tuple where the first element is the level and the second element is a boolean indicating success.
638636 */
639637export const commonAncestorLevel = ( ci : CellID , other : CellID ) : [ number , boolean ] => {
640638 let bits = ci ^ other
You can’t perform that action at this time.
0 commit comments