File: testround.rb

package info (click to toggle)
libnarray-ruby 0.5.9p7-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 432 kB
  • ctags: 517
  • sloc: ansic: 4,412; ruby: 1,281; python: 91; makefile: 5
file content (11 lines) | stat: -rw-r--r-- 211 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
require 'narray'

def testround a
  print "a = ";  p a
  print "a.floor = ";  p a.floor
  print "a.ceil  = ";  p a.ceil
  print "a.round = ";  p a.round
  print "\n"
end

testround NArray.float(4,2).indgen!/4-2