Open
Conversation
added 2 commits
July 13, 2025 10:40
gemtechd
reviewed
Jul 13, 2025
Owner
gemtechd
left a comment
There was a problem hiding this comment.
- remove all comments before pushing
- each test has to execute only one function
- where are the tests for the geometry-calculation.ts file?
modules/ecs6-class/line.ts
Outdated
| // return new Point({ x, y }) | ||
| // } | ||
| // } | ||
|
|
| const p2 = new Point({ x: 3, y: 6 }); | ||
| const line = new Line({ point1: p1, point2: p2 }); | ||
| line.calculateSlope(); | ||
| line.calculateNOfLineFunction(); |
Owner
There was a problem hiding this comment.
Why did you execute both functions in the test?
You have to execute one function
gemtechd
reviewed
Jul 13, 2025
test/test-geometry.test.ts
Outdated
| l1.calculateNOfLineFunction(); | ||
| const l2 = new Line({ point1: new Point({ x: 2, y: 2 }), point2: new Point({ x: 3, y: 3 }) }); | ||
| l2.calculateSlope(); | ||
| l2.calculateNOfLineFunction(); |
Owner
There was a problem hiding this comment.
what are these functions?
read the readme, there is an option to change the code itself
| const p2 = new Point({ x: 3, y: 6 }); | ||
| const line = new Line({ point1: p1, point2: p2 }); | ||
| line.calculateSlope(); | ||
| line.calculateNOfLineFunction(); |
gemtechd
reviewed
Jul 13, 2025
Owner
gemtechd
left a comment
There was a problem hiding this comment.
read the comments and fix the code
test/test-geometry.test.ts
Outdated
| const line2 = new Line({ point1: new Point({ x: 0, y: 1 }), point2: new Point({ x: 1, y: 2 }) }); | ||
| line1.calculateSlope(); | ||
| line1.calculateNOfLineFunction(); | ||
| line2.calculateSlope(); |
Owner
There was a problem hiding this comment.
executing more then one function on a test
Author
|
Dear teacher, I am now at Rava 14 and I opened an entrance in my name and
there is no vizual studio here.
בתאריך יום א׳, 13 ביולי 2025 ב-17:02 מאת gemtechd <
***@***.***>:
… ***@***.**** commented on this pull request.
read the comments and fix the code
------------------------------
In modules/geometry-calculation.ts
<#1 (comment)>
:
> const distance = Math.sqrt(distanceX + distanceY);
return distance;
}
export const calculateJunctionPoint = (line1: Line, line2: Line): Boolean | Point | undefined => {
- if (line1.slope === line2.slope) {
- if (line1.n === line2.n) {
+ if (line1.slope ===undefined|| line2.slope===undefined
+ || line1.n === undefined || line2.n === undefined) {
+ return undefined;
There is no way to calculate the data when it is undefined?
------------------------------
In test/test-geometry.test.ts
<#1 (comment)>
:
>
describe("calculateJunctionPoint", () => {
it("should return true for identical lines", () => {
- const l1 = new Line({ point1: new Point({ x: 0, y: 0 }), point2: new Point({ x: 1, y: 1 }) });
- l1.calculateSlope();
- l1.calculateNOfLineFunction();
- const l2 = new Line({ point1: new Point({ x: 2, y: 2 }), point2: new Point({ x: 3, y: 3 }) });
- l2.calculateSlope();
- l2.calculateNOfLineFunction();
- expect(calculateJunctionPoint(l1, l2)).toBe(true);
+ const p1 = new Point({ x: 0, y: 0 });
+ const p2 =new Point({ x: 2, y: 2 });
+ const line1 = new Line({ point1: p1, point2: p2 });
+ const line2 = new Line({ point1: p1, point2: p2 });
+
+ line1.calculateSlope();
+ line1.calculateNOfLineFunction();
+//
Still executing more then one function in a test...
------------------------------
In test/test-geometry.test.ts
<#1 (comment)>
:
> });
it("should return false for parallel lines with different n", () => {
- const l1 = new Line({ point1: new Point({ x: 0, y: 0 }), point2: new Point({ x: 1, y: 1 }) });
- l1.calculateSlope();
- l1.calculateNOfLineFunction();
- const l2 = new Line({ point1: new Point({ x: 0, y: 1 }), point2: new Point({ x: 1, y: 2 }) });
- l2.calculateSlope();
- l2.calculateNOfLineFunction();
- expect(calculateJunctionPoint(l1, l2)).toBe(false);
+ const line1 = new Line({ point1: new Point({ x: 0, y: 0 }), point2: new Point({ x: 1, y: 1 }) });
+ const line2 = new Line({ point1: new Point({ x: 0, y: 1 }), point2: new Point({ x: 1, y: 2 }) });
+ line1.calculateSlope();
+ line1.calculateNOfLineFunction();
+ line2.calculateSlope();
executing more then one function on a test
—
Reply to this email directly, view it on GitHub
<#1 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BS4GBENJHIPEQHZEEUEJGZD3IJRIHAVCNFSM6AAAAACBMWJXEKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTAMJUGE3TEMJSG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Author
|
Dear teacher, today I was not allowed to access the computer I work on and
I tried to open my project on another computer and the attempt was
unsuccessful. In the
.room, there is no Vizual Studio installed on the computer.'רבא14'
בתאריך יום ב׳, 14 ביולי 2025 ב-9:59 מאת תכנות - עמדה 22 <
***@***.***>:
… Dear teacher, I am now at Rava 14 and I opened an entrance in my name and
there is no vizual studio here.
בתאריך יום א׳, 13 ביולי 2025 ב-17:02 מאת gemtechd <
***@***.***>:
> ***@***.**** commented on this pull request.
>
> read the comments and fix the code
> ------------------------------
>
> In modules/geometry-calculation.ts
> <#1 (comment)>
> :
>
> > const distance = Math.sqrt(distanceX + distanceY);
> return distance;
> }
>
> export const calculateJunctionPoint = (line1: Line, line2: Line): Boolean | Point | undefined => {
> - if (line1.slope === line2.slope) {
> - if (line1.n === line2.n) {
> + if (line1.slope ===undefined|| line2.slope===undefined
> + || line1.n === undefined || line2.n === undefined) {
> + return undefined;
>
> There is no way to calculate the data when it is undefined?
> ------------------------------
>
> In test/test-geometry.test.ts
> <#1 (comment)>
> :
>
> >
> describe("calculateJunctionPoint", () => {
> it("should return true for identical lines", () => {
> - const l1 = new Line({ point1: new Point({ x: 0, y: 0 }), point2: new Point({ x: 1, y: 1 }) });
> - l1.calculateSlope();
> - l1.calculateNOfLineFunction();
> - const l2 = new Line({ point1: new Point({ x: 2, y: 2 }), point2: new Point({ x: 3, y: 3 }) });
> - l2.calculateSlope();
> - l2.calculateNOfLineFunction();
> - expect(calculateJunctionPoint(l1, l2)).toBe(true);
> + const p1 = new Point({ x: 0, y: 0 });
> + const p2 =new Point({ x: 2, y: 2 });
> + const line1 = new Line({ point1: p1, point2: p2 });
> + const line2 = new Line({ point1: p1, point2: p2 });
> +
> + line1.calculateSlope();
> + line1.calculateNOfLineFunction();
> +//
>
> Still executing more then one function in a test...
> ------------------------------
>
> In test/test-geometry.test.ts
> <#1 (comment)>
> :
>
> > });
>
> it("should return false for parallel lines with different n", () => {
> - const l1 = new Line({ point1: new Point({ x: 0, y: 0 }), point2: new Point({ x: 1, y: 1 }) });
> - l1.calculateSlope();
> - l1.calculateNOfLineFunction();
> - const l2 = new Line({ point1: new Point({ x: 0, y: 1 }), point2: new Point({ x: 1, y: 2 }) });
> - l2.calculateSlope();
> - l2.calculateNOfLineFunction();
> - expect(calculateJunctionPoint(l1, l2)).toBe(false);
> + const line1 = new Line({ point1: new Point({ x: 0, y: 0 }), point2: new Point({ x: 1, y: 1 }) });
> + const line2 = new Line({ point1: new Point({ x: 0, y: 1 }), point2: new Point({ x: 1, y: 2 }) });
> + line1.calculateSlope();
> + line1.calculateNOfLineFunction();
> + line2.calculateSlope();
>
> executing more then one function on a test
>
> —
> Reply to this email directly, view it on GitHub
> <#1 (review)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/BS4GBENJHIPEQHZEEUEJGZD3IJRIHAVCNFSM6AAAAACBMWJXEKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTAMJUGE3TEMJSG4>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Author
|
Dear teacher, I would like to know if the teacher accepted my correction.
"Try3 if the project is "good
השב ישירות לאימייל זה, צפה בו ב-GitHub
…>> <#1 (review)>
>> , או בטל את הרישום
>> <https://github.com/notifications/unsubscribe-auth/BS4GBENJHIPEQHZEEUEJGZD3IJRIHAVCNFSM6AAAAACBMWJXEKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTAMJUGE3TEMJSG4>
>> .
>> אתה מקבל הודעה זו מכיוון שאתה כתבת את השרשור.מזהה הודעה: < gemtechd /build-tests-ts/pull/
>> 1/review/3014172127 @ github.com >
>>
>
|
gemtechd
reviewed
Jul 15, 2025
modules/geometry-calculation.ts
Outdated
|
|
||
| export const calculateJunctionPoint = (line1: Line, line2: Line): boolean | Point | undefined => { | ||
| if (line1.slope === undefined || line2.slope === undefined || line1.n === undefined || line2.n === undefined) { | ||
| return undefined; |
Owner
There was a problem hiding this comment.
you can calculate the slope and the n of each line
use the functions from the class
added 2 commits
July 15, 2025 17:12
Author
|
Dear teacher, I haven't received the assignment yet.
בתאריך יום ג׳, 15 ביולי 2025 ב-16:47 מאת gemtechd <
***@***.***>:
… ***@***.**** commented on this pull request.
------------------------------
In modules/geometry-calculation.ts
<#1 (comment)>
:
> -export const calculateJunctionPoint = (line1: Line, line2: Line): Boolean | Point | undefined => {
- if (line1.slope ===undefined|| line2.slope===undefined
- || line1.n === undefined || line2.n === undefined) {
- return undefined;
- }
- if (line1.slope === line2.slope) {
- if(line1.n === line2.n) {
- return true
- }
- else {
- return false
- }
+
+export const calculateJunctionPoint = (line1: Line, line2: Line): boolean | Point | undefined => {
+ if (line1.slope === undefined || line2.slope === undefined || line1.n === undefined || line2.n === undefined) {
+ return undefined;
you can calculate the slope and the n of each line
use the functions from the class
—
Reply to this email directly, view it on GitHub
<#1 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BS4GBEOQQJHDN2OG2XS6DJ33IUBATAVCNFSM6AAAAACBMWJXEKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTAMRQGM4TQMZRGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@gemtechd write test on the code