From be8e7361aab68920f41f4a1c0d4a93b149011352 Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Wed, 12 Jan 2022 18:47:17 +0100 Subject: [PATCH] Updating copyrights, fixing bugs related to non continuous domains. --- .../qml/eu/ad5001/LogarithmPlotter/js/historylib.js | 2 +- .../qml/eu/ad5001/LogarithmPlotter/js/mathlib.js | 2 +- .../qml/eu/ad5001/LogarithmPlotter/js/objects.js | 2 +- .../qml/eu/ad5001/LogarithmPlotter/js/objs/autoload.js | 2 +- .../qml/eu/ad5001/LogarithmPlotter/js/objs/common.js | 2 +- .../qml/eu/ad5001/LogarithmPlotter/js/objs/function.js | 8 +++++--- .../qml/eu/ad5001/LogarithmPlotter/js/objs/gainbode.js | 2 +- .../qml/eu/ad5001/LogarithmPlotter/js/objs/phasebode.js | 2 +- .../qml/eu/ad5001/LogarithmPlotter/js/objs/point.js | 2 +- .../qml/eu/ad5001/LogarithmPlotter/js/objs/repartition.js | 2 +- .../qml/eu/ad5001/LogarithmPlotter/js/objs/sequence.js | 2 +- .../eu/ad5001/LogarithmPlotter/js/objs/sommegainsbode.js | 2 +- .../eu/ad5001/LogarithmPlotter/js/objs/sommephasesbode.js | 2 +- .../qml/eu/ad5001/LogarithmPlotter/js/objs/text.js | 2 +- .../qml/eu/ad5001/LogarithmPlotter/js/objs/xcursor.js | 2 +- .../qml/eu/ad5001/LogarithmPlotter/js/parameters.js | 2 +- .../qml/eu/ad5001/LogarithmPlotter/js/parsing/ast.js | 2 +- .../qml/eu/ad5001/LogarithmPlotter/js/parsing/builder.js | 2 +- .../qml/eu/ad5001/LogarithmPlotter/js/parsing/common.js | 2 +- .../eu/ad5001/LogarithmPlotter/js/parsing/reference.js | 2 +- .../eu/ad5001/LogarithmPlotter/js/parsing/tokenizer.js | 2 +- .../qml/eu/ad5001/LogarithmPlotter/js/utils.js | 2 +- 22 files changed, 26 insertions(+), 24 deletions(-) diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/historylib.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/historylib.js index 887859f..cae0769 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/historylib.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/historylib.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/mathlib.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/mathlib.js index 5a25431..2c52844 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/mathlib.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/mathlib.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objects.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objects.js index c9443df..52bfde8 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objects.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objects.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/autoload.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/autoload.js index 1818dfc..7ab6308 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/autoload.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/autoload.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/common.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/common.js index 6629cb7..7cbfaab 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/common.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/common.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/function.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/function.js index 3570b49..8b11990 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/function.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/function.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -135,16 +135,18 @@ class Function extends Common.ExecutableObject { var previousY; if(definitionDomain instanceof MathLib.SpecialDomain && definitionDomain.moveSupported) { // Point based functions. - previousX = definitionDomain.previous(previousX) + previousX = definitionDomain.next(previousX) if(previousX === null) previousX = definitionDomain.next(canvas.px2x(0)) previousY = expr.execute(previousX) if(!drawPoints && !drawDash) return while(previousX !== null && canvas.x2px(previousX) < canvas.canvasSize.width) { - var currentX = definitionDomain.next(previousX) + // Reconverted for canvas to fix for logarithmic scales. + var currentX = definitionDomain.next(canvas.px2x(canvas.x2px(previousX)+pxprecision)); var currentY = expr.execute(currentX) if(currentX === null) break; if((definitionDomain.includes(currentX) || definitionDomain.includes(previousX)) && (destinationDomain.includes(currentY) || destinationDomain.includes(previousY))) { + console.log(drawDash, drawPoints) if(drawDash) canvas.drawDashedLine(ctx, canvas.x2px(previousX), canvas.y2px(previousY), canvas.x2px(currentX), canvas.y2px(currentY)) if(drawPoints) { diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/gainbode.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/gainbode.js index d385862..7ecd963 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/gainbode.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/gainbode.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/phasebode.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/phasebode.js index c2f2bbd..63dba8b 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/phasebode.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/phasebode.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/point.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/point.js index 28869b9..db3839a 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/point.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/point.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/repartition.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/repartition.js index fe7f7d9..2d29d0d 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/repartition.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/repartition.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sequence.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sequence.js index 2cda49e..bbd53b2 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sequence.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sequence.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommegainsbode.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommegainsbode.js index 27af613..57f0ec7 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommegainsbode.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommegainsbode.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommephasesbode.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommephasesbode.js index 9b4d487..4d0c6f8 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommephasesbode.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommephasesbode.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/text.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/text.js index 6a183a4..45fd633 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/text.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/text.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/xcursor.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/xcursor.js index d66cb3e..c6eae5d 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/xcursor.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/xcursor.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parameters.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parameters.js index f8ecf8c..1eca5ae 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parameters.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parameters.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/ast.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/ast.js index 4a10d2d..82d07f1 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/ast.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/ast.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/builder.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/builder.js index d0ac2c6..d705491 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/builder.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/builder.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/common.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/common.js index ffc00b1..120411f 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/common.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/common.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/reference.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/reference.js index 26c5013..48ad2a8 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/reference.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/reference.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/tokenizer.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/tokenizer.js index e4eb533..dbb7abd 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/tokenizer.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/tokenizer.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/utils.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/utils.js index 2ac90a6..1ba5241 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/utils.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/utils.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - Create graphs with logarithm scales. - * Copyright (C) 2021 Ad5001 + * Copyright (C) 2022 Ad5001 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by