Skip to content

computeOffset testcase seem to be fail. #6

Open
@BorisLok

Description

@BorisLok

I did some testing accroding to your code, but the result came out to be failed (as below).

EXPECT_NEAR_LatLan(down,  SphericalUtil::computeOffset(front, M_PI * MathUtil::EARTH_RADIUS / 2, 180));

I tested the "compute offset" function in Javascript version and got the same answser LatLng(lat: -90, lng: 63.43494882292201) as your output.
So I think the answser shoud be LatLng(lat: -90, lng: 63.43494882292201) and not LatLng(lat: -90, lng: 0).

import { SphericalUtil, MathUtil} from "node-geometry-library";

let ans = SphericalUtil.computeOffset({ lat: 0, lng: 0 }, Math.PI * MathUtil.EARTH_RADIUS / 2.0, 180);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions