~ubuntu-branches/ubuntu/trusty/yorick-spydr/trusty

« back to all changes in this revision

Viewing changes to debian/patches/long_round

  • Committer: Bazaar Package Importer
  • Author(s): Thibaut Paumard
  • Date: 2010-04-06 18:15:49 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20100406181549-lptujqpcdw1axzw1
Tags: 0.8.0-2
change round() to long(round())

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Author: Thibaut Paumard <paumard@users.sourceforge.net>
 
2
Forwarded: yes
 
3
Description: change round() to long(round())
 
4
 round() is provided by several add-ons. The Yeti round returns a double.
 
5
 
 
6
 
 
7
--- a/spydr.i
 
8
+++ b/spydr.i
 
9
@@ -788,7 +788,7 @@
 
10
   } else if (spydr_itt>=5) { // histeq
 
11
     ind = span(0.,1.,spydr_ncolors);
 
12
   }
 
13
-  ind = round(ind*(spydr_ncolors-1)+1);
 
14
+  ind = long(round(ind*(spydr_ncolors-1)+1));
 
15
   r = r(ind); g = g(ind); b = b(ind);
 
16
 
 
17
   // and finally, load the palette:
 
18
--- a/spydr_various.i
 
19
+++ b/spydr_various.i
 
20
@@ -423,7 +423,7 @@
 
21
 
 
22
   if (method == 1) {
 
23
     beg: co = mouse(1,0,"Click on center of image to extract");
 
24
-    co1 = round(co(1:2)-[dimx/2.,dimy/2.]+1);
 
25
+    co1 = long(round(co(1:2)-[dimx/2.,dimy/2.]+1));
 
26
     co2 = co1 + [dimx,dimy]-1;
 
27
     xc  = [co1(1),co2(1)];
 
28
     yc  = [co1(2),co2(2)];
 
29
@@ -439,7 +439,7 @@
 
30
   }
 
31
 
 
32
   if (method == 2) {
 
33
-    co = round(mouse(1,1,"Click and drag to select image to extract")+0.5);
 
34
+    co = long(round(mouse(1,1,"Click and drag to select image to extract")+0.5));
 
35
     xc  = [co(1),co(3)];
 
36
     yc  = [co(2),co(4)];
 
37
     xc  = xc(sort(xc));