Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mappevurderingprog2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tam Minh Le
mappevurderingprog2
Merge requests
!5
Refactored: JuliaTransform method
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Refactored: JuliaTransform method
task.1.3
into
main
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Tam Minh Le
requested to merge
task.1.3
into
main
1 year ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
Fixed the JuliaTransform method
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
9e4ad01d
1 commit,
1 year ago
1 file
+
5
−
10
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/main/java/edu/ntnu/idatt2003/mappevurderingprog2/JuliaTransform.java
+
5
−
10
Options
@@ -11,18 +11,13 @@ public class JuliaTransform implements Transform2D{
@Override
public
Vector2D
transform
(
Vector2D
point
)
{
double
x
=
point
.
getX0
();
double
y
=
point
.
getX1
();
double
newX
=
x
*
x
-
y
*
y
+
this
.
point
.
getX0
();
double
newY
=
2
*
x
*
y
+
this
.
point
.
getX1
();
if
(
sign
==
-
1
)
{
newX
=
-
newX
;
newY
=
-
newY
;
if
(!(
point
instanceof
Complex
))
{
throw
new
IllegalArgumentException
(
"The point must be a complex number"
);
}
return
new
Vector2D
(
newX
,
newY
);
Complex
newVector
=
(
Complex
)
point
.
subtract
(
this
.
point
);
return
newVector
.
sqrt
();
}
}
Loading