Class Reflection

java.lang.Object
me.wobblyyyy.pathfinder.math.Reflection

public class Reflection
extends java.lang.Object
Reflect a value across a specific value.
Since:
0.4.0
Author:
Colin Robertson
  • Constructor Summary

    Constructors
    Constructor Description
    Reflection()  
  • Method Summary

    Modifier and Type Method Description
    static double of​(double value)
    Reflect a number across 0 as an axis.
    static double of​(double value, double center)
    Reflect a number across a specified axis.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Reflection

      public Reflection()
  • Method Details

    • of

      public static double of​(double value)
      Reflect a number across 0 as an axis.
      Parameters:
      value - the number that should be reflected.
      Returns:
      the reflected number.
    • of

      public static double of​(double value, double center)
      Reflect a number across a specified axis.
      Parameters:
      value - the number that should be reflected.
      center - the axis to reflect over.
      Returns:
      the reflected number.