import { Point } from 'geojson' ; import { bearing } from '@turf/turf' ; export function toRadians ( degrees ) { return degrees * Math . PI / 180 ; } export function toDegrees ( radians ) { return radians * 180 / Math . PI ; } export function getAngleDegreeBetweenPoints ( source , destination ) { const brng = bearing ( source , destination ) ; return brng ; } export function randomColor ( ) { return `rgb(${ Math . round ( Math . random ( ) * 255 ) },${ Math . round ( Math . random ( ) * 255 ) },${ Math . round ( Math . random ( ) * 255 ) })` ; }