File: include_1.rb

package info (click to toggle)
ctioga 1.10-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 1,052 kB
  • ctags: 953
  • sloc: ruby: 9,306; sh: 504; makefile: 6
file content (15 lines) | stat: -rw-r--r-- 341 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# In this file, there are some examples of how we can define
# mathematical functions and use them. See the README file for
# more details. You don't need to include Math as it will be done
# automatically by backends.


# We define a simple polynom
def pol(x)
  (1.0 - x) * (1.0 + x)
end

# here, we redefine sin(x)
def sin(x)
  cos(x)
end