/vqdr/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/vqdr/trunk

« back to all changes in this revision

Viewing changes to src/libvee/fast_number.vala

  • Committer: Gustav Hartvigsson
  • Date: 2024-12-22 00:42:11 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20241222004211-eg5i6yqp677vmc2n
[libvee/fast_number.vala] Removed debug code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
314
314
    
315
315
    
316
316
    private void parse_raw_number (string str) {
317
 
      //debug (@"(parse_raw_number) str: $str");
318
317
      int64 ret_val = 0;
319
318
      int i_of_dot = str.index_of_char ('.');
320
319
      if (i_of_dot >= 0) {
328
327
          this.leading_zeros = i;
329
328
          // remove leading zeros
330
329
          intr_str = intr_str.substring (i);
331
 
          //debug (@"(parse_raw_number) Intermediate string: $intr_str");
 
330
          
332
331
          ret_val = int64.parse (intr_str);
333
332
        }
334
333
        
335
 
        // debug (@"(parse_raw_number) i_of_dot: $i_of_dot, ret_val (decimal): $ret_val\n");
336
 
        
337
334
        // Normalise the digits.
338
335
        while (ret_val > MUL_FACTOR) {
339
336
          ret_val = ret_val / 10;
340
 
          // debug (@"(parse_raw_number) retval (loop): $ret_val");
341
337
        }
342
338
        
343
339
        for (var i = leading_zeros; i > 0; i--) {
344
340
          ret_val = ret_val / 10;
345
 
          // debug (@"(parse_raw_number) retval (loop2): $ret_val");
346
341
        }
347
342
        
348
 
        // debug (@"ret_val (normalised): $ret_val\n");
349
343
        
350
344
        // get integer number
351
345
        ret_val = ret_val + (int64.parse (str.substring (0, i_of_dot))
354
348
      } else {
355
349
        ret_val = (int64.parse (str) * MUL_FACTOR);
356
350
      }
357
 
      //debug (@"(parse_raw_number) ret_val (finished): $ret_val\n");
358
351
      this.raw_number = ret_val;
359
352
    }
360
353
  }