   def process(pOptions) do
     hour = pOptions[:hour]
     minute = pOptions[:minute]
-    adjust = pOptions[:adjust]
-    normalize = pOptions[:normalize]
-    positive = pOptions[:positive]
-    bounds = pOptions[:bounds]
-    angle = ClockAngle.radians(hour, minute, adjust, normalize, positive, bounds)
-    output(Format.time(hour, minute), Format.angle(angle, pOptions))
+    radians = ClockAngle.radians(pOptions)
+    output(Format.time(hour, minute), Format.angle(radians, pOptions))
   end
 
   def output(pTime, pAngle) do

    {parsed, remaining, invalid} = OptionParser.parse(args, strict: switches, aliases: aliases)
    options = defaults
    |> Keyword.merge(parsed)
    cond do
      options[:help] or (0 < length remaining) or (0 < length invalid) ->
        usage


  def normalize_difference(pValue), do: pValue

  def neuterOptions(pOptions) do
    pOptions
    |> Map.merge(%{normalize: false, positive: false})
  end

  def radians(pOptions \\ %{})

  def radians(%{hour: pHour, minute: pMinute, bounds: true}) when
    pHour < 0 or @hours_in_day <= pHour or
    pMinute < 0 or @minutes_in_circle <= pMinute
  do
    :error
  end

  # normalized positive result
  def radians(%{normalize: true, positive: true} = pOptions) do
    radians(pOptions |> neuterOptions)
    |> normalize_difference
  end

  # normalize result
  def radians(%{normalize: true} = pOptions) do
    radians(pOptions |> neuterOptions)
    |> normalize
  end

  # positive result
  def radians(%{positive: true} = pOptions) do
    radians(pOptions |> neuterOptions)
    |> Kernel.abs
  end

  # adjust hour hand
  def radians(%{hour: pHour, minute: pMinute, adjust: true}) do
    minuteToRadians(pMinute) - hourToRadians(pHour) - adjustHourInRadians(pMinute)
  end

  # do not adjust hour hand
  def radians(%{hour: pHour, minute: pMinute}) do
    minuteToRadians(pMinute) - hourToRadians(pHour)
  end

  # catch all
  def radians(_), do: :error
end

defmodule Format do
