~ubuntu-branches/ubuntu/raring/blitz++/raring

« back to all changes in this revision

Viewing changes to doc/examples/fixed.texi

  • Committer: Bazaar Package Importer
  • Author(s): Konstantinos Margaritis
  • Date: 2005-02-28 20:25:01 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050228202501-3i4f2sknnprsqfhz
Tags: 1:0.8-4
Added missing build-depends (Closes: #297323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#include <fixed-point.h> // FixedPoint class
 
3
 
 
4
int main()
 
5
@{
 
6
    // Create an array using the FixedPoint class:
 
7
 
 
8
    Array<FixedPoint, 2> A(4,4), B(4,4);
 
9
 
 
10
    A = 0.5, 0.3, 0.8, 0.2,
 
11
        0.1, 0.3, 0.2, 0.9,
 
12
        0.0, 1.0, 0.7, 0.4,
 
13
        0.2, 0.3, 0.8, 0.4;
 
14
 
 
15
    B = A + 0.05;
 
16
 
 
17
    cout << "B = " << B << endl;
 
18
 
 
19
    return 0;
 
20
@}