Paclay-Saris pod racers / Mbed 2 deprecated Algo_charges_fictives_4

Dependencies:   mbed

Utils.cpp

Committer:
SolalNathan
Date:
2019-06-07
Revision:
18:daba0b3777c0

File content as of revision 18:daba0b3777c0:

#include "SaphTeamRacing.h"

float distance(float x_1, float x_2, float y_1, float y_2)
{
    /*
    Fonction qui renvoie la distance entre deux points en norme 2.
    */
    
    float norm2;
    norm2 = sqrt((x_1 - x_2)*(x_1 - x_2) + (y_1 - y_2)*(y_1 - y_2));
    return norm2;
}