Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Do not trust a computer...

Do not trust a computer...

Scheduled Pinned Locked Moved The Weird and The Wonderful
tutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    notmasteryet
    wrote on last edited by
    #1

    Found in legacy code...

    Dim startbit As Integer = ((6 * data.i) + (3 * data.j) + 16)
    startbit = Math.Ceiling(startbit / 16) * 16

    If startbit Mod 16 <> 0 Then Throw New Exception("you don't know how to round")

    :) Always check what computer is doing

    L 1 Reply Last reply
    0
    • N notmasteryet

      Found in legacy code...

      Dim startbit As Integer = ((6 * data.i) + (3 * data.j) + 16)
      startbit = Math.Ceiling(startbit / 16) * 16

      If startbit Mod 16 <> 0 Then Throw New Exception("you don't know how to round")

      :) Always check what computer is doing

      L Offline
      L Offline
      Lutoslaw
      wrote on last edited by
      #2

      notmasteryet wrote:

      startbit = Math.Ceiling(startbit / 16) * 16

      Typical and terrible VB approach. :/

      Greetings - Gajatko Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups