From 0079221776106e3ca91076938e80d37e38eacc29 Mon Sep 17 00:00:00 2001
From: Hong-Phuc Bui <hong-phuc.bui@htwsaar.de>
Date: Fri, 17 Oct 2025 07:01:14 +0200
Subject: [PATCH] 1. Vorlesung
---
textbased-programms/taylor-serie-trigonometry.js | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/textbased-programms/taylor-serie-trigonometry.js b/textbased-programms/taylor-serie-trigonometry.js
index 43cd8ba..2073b67 100644
--- a/textbased-programms/taylor-serie-trigonometry.js
+++ b/textbased-programms/taylor-serie-trigonometry.js
@@ -5,8 +5,8 @@
import {terminal} from "./dfhi.js";
-window.main = function(...argv) {
- //const x = Number.parseFloat(argv[0]);
+window.main = (...argv) => {
+ //const x = Number(argv[0]);
//const x_rad = x * Math.PI / 180;
const alpha = [0, 30, 45, 60, 90];
alpha.map(x => x*Math.PI/180).forEach( a => {
@@ -17,13 +17,13 @@
};
-function makeTest(testName, value, impl, ref) {
+const makeTest = (testName, value, impl, ref) => {
const result = impl(value);
const expected = ref(value);
terminal.print(`${testName} result: ${result} expected : ${expected}\n`);
}
-function sin(x) {
+const sin = (x) => {
let sum = x;
let term = -(x**3 / 6);
const xsqr = x*x;
@@ -36,7 +36,7 @@
return sum;
}
-function cos(x) {
+const cos = (x) => {
let sum = 1;
const xsqr = x*x;
let g = 2;
--
Gitblit v1.10.0