[SCM] Lisaac library math branch, master, updated. 95432df7db6429dcc6ae3a62b0d87295cde3e12e
Damien Bouvarel
dams.bouvarel at wanadoo.fr
Wed Aug 26 23:44:37 UTC 2009
The following commit has been merged in the master branch:
commit 95432df7db6429dcc6ae3a62b0d87295cde3e12e
Author: Damien Bouvarel <dams.bouvarel at wanadoo.fr>
Date: Thu Aug 27 01:44:26 2009 +0200
0.14 update
diff --git a/low_level/abstract_matrix.li b/low_level/abstract_matrix.li
index 8eed570..56e0b60 100644
--- a/low_level/abstract_matrix.li
+++ b/low_level/abstract_matrix.li
@@ -21,7 +21,7 @@
Section Header
- + name := ABSTRACT_MATRIX[E];
+ + name := ABSTRACT_MATRIX(E);
- comment := "(n,m) matrix";
@@ -31,7 +31,7 @@ Section Inherit
Section Private
- + storage:FAST_ARRAY2[E];
+ + storage:FAST_ARRAY2(E);
Section Public
@@ -41,17 +41,17 @@ Section Public
- make (n,m:INTEGER) <-
(
- storage := FAST_ARRAY2[E].create (n,m);
+ storage := FAST_ARRAY2(E).create (n,m);
);
- - create_from v:FAST_ARRAY2[E] :SELF <-
+ - create_from v:FAST_ARRAY2(E) :SELF <-
( + result:SELF;
result := SELF.clone;
result.make_from v;
result
);
- - make_from v:FAST_ARRAY2[E] <-
+ - make_from v:FAST_ARRAY2(E) <-
(
storage := v;
);
@@ -84,7 +84,7 @@ Section Public
storage.item (l,c)
);
- - getv:FAST_ARRAY2[E] <-
+ - getv:FAST_ARRAY2(E) <-
(
storage
);
@@ -121,30 +121,30 @@ Section Public
};
);
- - '+' Left 80 other:SELF :SELF <-
- ( + m:FAST_ARRAY[E];
+ - Self:SELF '+' Left 80 other:SELF :SELF <-
+ ( + m:FAST_ARRAY(E);
- m := FAST_ARRAY[E].create (lines,columns);
+ m := FAST_ARRAY(E).create (lines,columns);
m.put_foreach { (l,c:INTEGER);
item (l,c) + other.item (l,c)
};
create_from m
);
- - '-' Left 80 other:SELF :SELF <-
- ( + m:FAST_ARRAY[E];
+ - Self:SELF '-' Left 80 other:SELF :SELF <-
+ ( + m:FAST_ARRAY(E);
- m := FAST_ARRAY[E].create (lines,columns);
+ m := FAST_ARRAY(E).create (lines,columns);
m.put_foreach { (l,c:INTEGER);
item (l,c) - other.item (l,c)
};
create_from m
);
- - '*' Left 100 scalar:E :SELF <-
- ( + m:FAST_ARRAY[E];
+ - Self:SELF '*' Left 100 scalar:E :SELF <-
+ ( + m:FAST_ARRAY(E);
- m := FAST_ARRAY[E].create (lines,columns);
+ m := FAST_ARRAY(E).create (lines,columns);
m.put_foreach { (l,c:INTEGER);
item (l,c) * scalar
};
diff --git a/matrix.li b/matrix.li
index dc6c280..337bd72 100644
--- a/matrix.li
+++ b/matrix.li
@@ -21,13 +21,13 @@
Section Header
- + name := MATRIX[E];
+ + name := MATRIX(E);
- comment := "(n,m) matrix";
Section Inherit
- - parent_abstract_matrix:Expanded ABSTRACT_MATRIX[E];
+ - parent_abstract_matrix:Expanded ABSTRACT_MATRIX(E);
Section Public
diff --git a/matrix4.li b/matrix4.li
index 68d2c45..44ade84 100644
--- a/matrix4.li
+++ b/matrix4.li
@@ -21,13 +21,13 @@
Section Header
- + name := MATRIX4[E];
+ + name := MATRIX4(E);
- comment := "4x4 matrix";
Section Inherit
- + parent_matrix:Expanded ABSTRACT_MATRIX[E];
+ + parent_matrix:Expanded ABSTRACT_MATRIX(E);
Section Public
diff --git a/vector2.li b/vector2.li
index 0e6cf12..a43db64 100644
--- a/vector2.li
+++ b/vector2.li
@@ -21,7 +21,7 @@
Section Header
- + name := VECTOR2[E];
+ + name := VECTOR2(E);
- comment := "(x,y) vector";
@@ -68,37 +68,37 @@ Section Public
x, y
);
- - getv:FAST_ARRAY[E] <-
+ - getv:FAST_ARRAY(E) <-
(
- + result:FAST_ARRAY[E];
+ + result:FAST_ARRAY(E);
- result := FAST_ARRAY[E].create 2;
+ result := FAST_ARRAY(E).create 2;
result.put x to 0;
result.put y to 1;
result
);
- - '-' :SELF <-
+ - Self:SELF '-' :SELF <-
(
create (-x, -y)
);
- - '+' Left 80 other:SELF :SELF <-
+ - Self:SELF '+' Left 80 other:SELF :SELF <-
(
create (x + other.x, y + other.y)
);
- - '-' Left 80 other:SELF :SELF <-
+ - Self:SELF '-' Left 80 other:SELF :SELF <-
(
create (x - other.x, y - other.y)
);
- - '*' Left 100 scalar:E :SELF <-
+ - Self:SELF '*' Left 100 scalar:E :SELF <-
(
create (scalar * x, scalar * y)
);
- - '/' Left 100 scalar:E :SELF <-
+ - Self:SELF '/' Left 100 scalar:E :SELF <-
(
? {scalar != 0};
create (x / scalar, y / scalar)
diff --git a/vector3.li b/vector3.li
index 744b370..e94f656 100644
--- a/vector3.li
+++ b/vector3.li
@@ -21,7 +21,7 @@
Section Header
- + name := VECTOR3[E];
+ + name := VECTOR3(E);
- comment := "(x,y,z) vector";
@@ -74,38 +74,38 @@ Section Public
x, y, z
);
- - getv:FAST_ARRAY[E] <-
+ - getv:FAST_ARRAY(E) <-
(
- + result:FAST_ARRAY[E];
+ + result:FAST_ARRAY(E);
- result := FAST_ARRAY[E].create 3;
+ result := FAST_ARRAY(E).create 3;
result.put x to 0;
result.put y to 1;
result.put z to 2;
result
);
- - '-' :SELF <-
+ - '-' Self:SELF :SELF <-
(
create (-x, -y, -z)
);
- - '+' Left 80 other:SELF :SELF <-
+ - Self:SELF '+' Left 80 other:SELF :SELF <-
(
create (x + other.x, y + other.y, z + other.z)
);
- - '-' Left 80 other:SELF :SELF <-
+ - Self:SELF '-' Left 80 other:SELF :SELF <-
(
create (x - other.x, y - other.y, z - other.z)
);
- - '*' Left 100 scalar:E :SELF <-
+ - Self:SELF '*' Left 100 scalar:E :SELF <-
(
create (scalar * x, scalar * y, scalar * z)
);
- - '/' Left 100 scalar:E :SELF <-
+ - Self:SELF '/' Left 100 scalar:E :SELF <-
(
? {scalar != 0};
create (x / scalar, y / scalar, z / scalar)
@@ -116,7 +116,7 @@ Section Public
(
(x*x + y*y + z*z).sqrt
);
-
+
- normalize <-
// normalize self vector (of length 1)
( + m:E;
diff --git a/vector4.li b/vector4.li
index 97bb439..4b7f0d8 100644
--- a/vector4.li
+++ b/vector4.li
@@ -21,7 +21,7 @@
Section Header
- + name := VECTOR4[E];
+ + name := VECTOR4(E);
- comment := "(x,y,z,w) vector";
@@ -79,11 +79,11 @@ Section Public
x, y, z, w
);
- - getv:FAST_ARRAY[E] <-
+ - getv:FAST_ARRAY(E) <-
(
- + result:FAST_ARRAY[E];
+ + result:FAST_ARRAY(E);
- result := FAST_ARRAY[E].create 4;
+ result := FAST_ARRAY(E).create 4;
result.put x to 0;
result.put y to 1;
result.put z to 2;
@@ -91,27 +91,27 @@ Section Public
result
);
- - '-' :SELF <-
+ - Self:SELF '-' :SELF <-
(
create (-x, -y, -z, -w)
);
- - '+' Left 80 other:SELF :SELF <-
+ - Self:SELF '+' Left 80 other:SELF :SELF <-
(
create (x + other.x, y + other.y, z + other.z, w + other.w)
);
- - '-' Left 80 other:SELF :SELF <-
+ - Self:SELF '-' Left 80 other:SELF :SELF <-
(
create (x - other.x, y - other.y, z - other.z, w - other.w)
);
- - '*' Left 100 scalar:E :SELF <-
+ - Self:SELF '*' Left 100 scalar:E :SELF <-
(
create (scalar * x, scalar * y, scalar * z, scalar * w)
);
- - '/' Left 100 scalar:E :SELF <-
+ - Self:SELF '/' Left 100 scalar:E :SELF <-
(
? {scalar != 0};
create (x / scalar, y / scalar, z / scalar, w / scalar)
--
Lisaac library math
More information about the Lisaac-commits
mailing list