Skip to content

Commit

Permalink
Change to float
Browse files Browse the repository at this point in the history
  • Loading branch information
davidvanleeuwen committed Mar 20, 2024
1 parent d4c41b8 commit 860e563
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/lib/mave_metrics/stats.ex
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ defmodule MaveMetrics.Stats do
total_duration = round(pause_event.video_time) - round(play_event.video_time) + 1
total_overlap = Enum.sum(for %{overlap: o} <- overlapping_durations, do: o)
uniqueness = (total_duration - total_overlap) / total_duration
uniqueness = if uniqueness < 0, do: 0, else: uniqueness
uniqueness = if uniqueness < 0, do: 0.0, else: uniqueness

session = Session |> Repo.get!(pause_event.session_id)

Expand Down

0 comments on commit 860e563

Please sign in to comment.