remove unneeded non null assertion
This commit is contained in:
parent
883bea8baa
commit
142f485a4a
1 changed files with 3 additions and 3 deletions
|
@ -65,10 +65,10 @@ function isLocationCloseToPoint(
|
|||
location: Location,
|
||||
radius: number
|
||||
) {
|
||||
const a = (radius * _scaleFactor(centerPoint.latitude!)) / KMS_PER_DEGREE;
|
||||
const a = (radius * _scaleFactor(centerPoint.latitude)) / KMS_PER_DEGREE;
|
||||
const b = radius / KMS_PER_DEGREE;
|
||||
const x = centerPoint.latitude! - location.latitude!;
|
||||
const y = centerPoint.longitude! - location.longitude!;
|
||||
const x = centerPoint.latitude - location.latitude;
|
||||
const y = centerPoint.longitude - location.longitude;
|
||||
if ((x * x) / (a * a) + (y * y) / (b * b) <= 1) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue