Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nghyd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Cassiopée
nghyd
Commits
ddd99a63
Commit
ddd99a63
authored
6 years ago
by
mathias.chouet
Browse files
Options
Downloads
Plain Diff
Merge branch 'exemple-simplification' into update-dependencies
parents
d396ab26
a092bc6d
No related branches found
No related tags found
1 merge request
!30
Resolve "Mettre à jour proprement vers Angular 7"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/services/app-setup/app-setup.service.ts
+8
-39
8 additions, 39 deletions
src/app/services/app-setup/app-setup.service.ts
with
8 additions
and
39 deletions
src/app/services/app-setup/app-setup.service.ts
+
8
−
39
View file @
ddd99a63
/**
* Stores app preferences
* @TODO save in cookie / localStorage ?
*/
export
class
ApplicationSetupService
{
private
_displayPrecision
:
number
;
private
_computePrecision
:
number
;
private
_newtonMaxIter
:
number
;
constructor
()
{
this
.
defaults
();
}
public
defaults
()
{
this
.
_displayPrecision
=
0.001
;
this
.
_computePrecision
=
0.0001
;
this
.
_newtonMaxIter
=
50
;
}
public
get
displayPrecision
()
{
return
this
.
_displayPrecision
;
}
public
set
displayPrecision
(
p
:
number
)
{
this
.
_displayPrecision
=
p
;
}
public
displayPrecision
=
0.001
;
public
computePrecision
=
0.0001
;
public
newtonMaxIter
=
50
;
public
get
displayDigits
()
{
return
-
Math
.
log10
(
this
.
_displayPrecision
);
}
public
get
computePrecision
()
{
return
this
.
_computePrecision
;
}
public
set
computePrecision
(
p
:
number
)
{
this
.
_computePrecision
=
p
;
}
public
get
newtonMaxIter
()
{
return
this
.
_newtonMaxIter
;
}
public
set
newtonMaxIter
(
p
:
number
)
{
this
.
_newtonMaxIter
=
p
;
return
-
Math
.
log10
(
this
.
displayPrecision
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment