No, it's

var objective(PERFORMANCE *Performance)
{
var opti = Performance->vR2;
return opti;
}

And yes, when your function is better for lower results, return the reciprocal or the difference to a maximum.