# -*- coding: utf-8 -*-
"""
Created on Thu Nov  8 10:05:06 2018

@author: vmahout
"""

def Inside_V1(x,y) :
    dist = x**2+y**2
    if (dist <= 1 ):
        sol = 1
    else:
        sol = -1
    
    return(sol)
    
def Inside_V2(x,y) :
    if ((type(x) == float) and (type(y) == float )) : 
        dist = x**2+y**2-1
        #if (dist <= 0 ):
        #   sol = True
        #else:
        #    sol = False
        sol = (dist <= 0)
    else :
        print("Impossible à évaluer, les coordonnées ne sont pas toutes réelles")
        sol = -1;
    return(sol)

    
#val = Inside_V1(.2,.4)
#print("appartenance : ",val)    
#val2 = Inside_V1(2,.4)
#print("appartenance 2: ",val2)    
#val3 = Inside_V2(.2,.4)
#print("appartenance : ",val3)    
#val4 = Inside_V2(2,.4)
#print("appartenance 2: ",val4)