-
Notifications
You must be signed in to change notification settings - Fork 10
Dev #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Dev #1
Conversation
gemtechd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 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 }) | ||
| // } | ||
| // } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are these comments?
| const p2 = new Point({ x: 3, y: 6 }); | ||
| const line = new Line({ point1: p1, point2: p2 }); | ||
| line.calculateSlope(); | ||
| line.calculateNOfLineFunction(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you execute both functions in the test?
You have to execute one function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
???
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(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
???
gemtechd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
executing more then one function on a test
|
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:
***@***.***>
|
|
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:
> ***@***.***>
>
|
|
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 >
>>
>
|
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can calculate the slope and the n of each line
use the functions from the class
|
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:
***@***.***>
|
@gemtechd write test on the code