From c73e57cf2b664bf9ea96541d8ae00accb94d7a08 Mon Sep 17 00:00:00 2001 From: "pl@gohorb.ba-horb.de" Date: Tue, 11 Apr 2023 15:35:15 +0200 Subject: [PATCH] new file: resources/bytecode/javFiles/Scalar.jav --- resources/bytecode/javFiles/Scalar.jav | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 resources/bytecode/javFiles/Scalar.jav diff --git a/resources/bytecode/javFiles/Scalar.jav b/resources/bytecode/javFiles/Scalar.jav new file mode 100644 index 000000000..c0dc0df20 --- /dev/null +++ b/resources/bytecode/javFiles/Scalar.jav @@ -0,0 +1,17 @@ +//import java.util.Vector; +import java.lang.Integer; +import java.lang.Float; +//import java.lang.Byte; +//import java.lang.Boolean; + +public class Scalar extends Vector { + + mul(v) { + var ret = 0; + var i = 0; + while(i < size()) { + ret = ret + this.elementAt(i) * v.elementAt(i); + } + return ret; + } +}