greeks.js
function getDelta(s, k, t, v, r, callPut)
{
  if(callPut === "call")
  {
    return _callDelta(s, k, t, v, r);
  }
  else // put
  {
    return _putDelta(s, k, t, v, r);
  }
}
function getDelta(s, k, t, v, r, callPut)
{
  if(callPut === "call")
  {
    return _callDelta(s, k, t, v, r);
  }
  else // put
  {
    return _putDelta(s, k, t, v, r);
  }
}
function getDelta ( s , k , t , v , r , callPut ) { if ( callPut === "call" ) { return _callDelta ( s , k , t , v , r ) ; } else // put { return _putDelta ( s , k , t , v , r ) ; } }
Calculates the delta of an option.

@param {Number} s Current price of the underlying
@param {Number} k Strike price
@param {Number} t Time to experiation in years
@param {Number} v Volatility as a decimal
@param {Number} r Anual risk-free interest rate as a decimal
@param {String} callPut The type of option - "call" or "put"
@returns {Number} The delta of the option
Calculates the delta of an option .