Permalink
Browse files

tlib#bitwise#Num2Bits(): Supports returning floats

  • Loading branch information...
1 parent f674cb8 commit 52ca8d241d722ca11709e7940a27394537518e89 @tomtom committed Dec 18, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 autoload/tlib/bitwise.vim
@@ -1,6 +1,6 @@
" @Author: Tom Link (mailto:micathom AT gmail com?subject=[vim])
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
-" @Revision: 92
+" @Revision: 93
function! tlib#bitwise#Num2Bits(num) "{{{3
@@ -26,7 +26,11 @@ function! tlib#bitwise#Bits2Num(bits, ...) "{{{3
endfor
" TLogVAR num
if base == 10
- return float2nr(num)
+ if type(base) == 5
+ return num
+ else
+ return float2nr(num)
+ endif
else
return tlib#number#ConvertBase(num, base)
endif

0 comments on commit 52ca8d2

Please sign in to comment.