News for hackers. Stuff that matters.
Re:Ray Tracing in pure CMake by tgv on Saturday January 09, 2021 @08:52AM (#25700328)
Let me tell you one detail: since cmake doesn't have floats, they use fixed point arithmetic. LOOK AT IT. You know you want too!

  function(sqrt x res)
      div_by_2(${x} guess)

      foreach(counter RANGE 4)
          if(${guess} EQUAL 0)
              set("${res}" 0 PARENT_SCOPE)
              return()
          endif()

          div(${x} ${guess} tmp)
          add(${tmp} ${guess} tmp)
          div_by_2(${tmp} guess)
      endforeach()

      set("${res}" "${guess}" PARENT_SCOPE)
  endfunction()

There are no comments on this comment yet.