Check if a point is inside , outside or on a Hyperbola | Function to check if the point ( x , y ) lies inside , on or outside the given hyperbola ; Stores the value of the equation ; Generate output based on value of p ; Driver Code
function checkpoint ( h , k , x , y , a , b ) { p = ( ( Math . pow ( ( x - h ) , 2 ) / Math . pow ( a , 2 ) ) - ( Math . pow ( ( y - k ) , 2 ) / Math . pow ( b , 2 ) ) ) if ( p > 1 ) console . log ( " " ) ; else if ( p == 1 ) console . log ( " " ) ; else console . log ( " " ) ; } function main ( ) { var h = 0 ; var k = 0 ; var x = 2 ; var y = 1 ; var a = 4 ; var b = 5 ; checkpoint ( h , k , x , y , a , b ) ; } main ( )