Skip to content

Commit

Permalink
Create pilot.utils.js
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Jul 15, 2024
1 parent 4db6c8e commit e89e9f0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions advanced_ai_pilot/pilot.utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export function clamp(value, min, max) {
return Math.min(Math.max(value, min), max);
}

export function normalize(value, min, max) {
return (value - min) / (max - min);
}

0 comments on commit e89e9f0

Please sign in to comment.