Skip to content

Commit

Permalink
563 IncrementalTreeMapSetting, revised PNorm property.
Browse files Browse the repository at this point in the history
  • Loading branch information
jschramm committed Aug 31, 2023
1 parent 820c7f5 commit ffefc72
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions Assets/SEE/Game/City/IncrementalTreeMapSetting.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using SEE.Utils;
using Sirenix.OdinInspector;
using UnityEngine;
Expand Down Expand Up @@ -71,21 +72,15 @@ public class IncrementalTreeMapSetting : ConfigIO.PersistentConfigItem
/// <summary>
/// Maps <see cref="pNorm"/> to a double.
/// </summary>
public double PNorm
{
get
{
return pNorm switch
public double PNorm => pNorm switch
{
(PNormRange.P1Manhattan) => 1d,
(PNormRange.P2Euclidean) => 2d,
(PNormRange.P3) => 3d,
(PNormRange.P4) => 4d,
(PNormRange.PInfinityChebyshev) => double.PositiveInfinity,
_ => 2d
_ => throw new InvalidEnumArgumentException("Unrecognized PNormRange value.")
};
}
}

public void Save(ConfigWriter writer, string label)
{
Expand Down

0 comments on commit ffefc72

Please sign in to comment.