Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Commit

Permalink
Switch some usages from Math to Mathf (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
Saticmotion authored Mar 22, 2018
1 parent d1becaa commit 94349dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Assets/Scripts/Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ void UpdateTimeline()
}
}

if (Math.Abs(timelineZoom - timelineZoomTarget) > 0.0025)
if (Mathf.Abs(timelineZoom - timelineZoomTarget) > 0.0025)
{
timelineZoom = Mathf.Lerp(timelineZoom, timelineZoomTarget, 0.15f);
}
Expand Down Expand Up @@ -819,7 +819,7 @@ void UpdateTimeline()

//NOTE(Simon): Timeline labels
{
var maxNumLabels = Math.Floor(timelineWidth / 100);
var maxNumLabels = Mathf.Floor(timelineWidth / 100);
var lowerround = FloorTime(zoomedLength / maxNumLabels);
var upperround = CeilTime(zoomedLength / maxNumLabels);

Expand Down
8 changes: 4 additions & 4 deletions Assets/Scripts/UIScripts/IndexPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -323,13 +323,13 @@ public IEnumerator LoadInternetPageInternal()
//Note(Simon): Videos
{
var videosThisPage = loadedVideos.videos ?? new List<VideoSerialize>();
while (videos.Count < Math.Min(videosPerPage, videosThisPage.Count))
while (videos.Count < Mathf.Min(videosPerPage, videosThisPage.Count))
{
var video = Instantiate(videoPrefab);
video.transform.SetParent(videoContainer.transform, false);
videos.Add(video);
}
while (videos.Count > Math.Min(videosPerPage, videosThisPage.Count))
while (videos.Count > Mathf.Min(videosPerPage, videosThisPage.Count))
{
var video = videos[videos.Count - 1];
videos.RemoveAt(videos.Count - 1);
Expand Down Expand Up @@ -392,13 +392,13 @@ public void LoadLocalPageInternal()
//Note(Simon): Videos
{
var videosThisPage = loadedVideos.videos ?? new List<VideoSerialize>();
while (videos.Count < Math.Min(videosPerPage, videosThisPage.Count))
while (videos.Count < Mathf.Min(videosPerPage, videosThisPage.Count))
{
var video = Instantiate(videoPrefab);
video.transform.SetParent(videoContainer.transform, false);
videos.Add(video);
}
while (videos.Count > Math.Min(videosPerPage, videosThisPage.Count))
while (videos.Count > Mathf.Min(videosPerPage, videosThisPage.Count))
{
var video = videos[videos.Count - 1];
videos.RemoveAt(videos.Count - 1);
Expand Down

0 comments on commit 94349dd

Please sign in to comment.