Class Reciprocal

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

public class Reciprocal
extends java.lang.Object
Math functionality for finding the reciprocal of a number.
Since:
0.5.0
Author:
Colin Robertson
  • Constructor Summary

    Constructors
    Constructor Description
    Reciprocal()  
  • Method Summary

    Modifier and Type Method Description
    static double of​(double input)
    Get the reciprocal of a specified number.
    static double of​(double input, double scale)
    Get the reciprocal of a specified number and multiply it by the provided scale coefficient.

    Methods inherited from class java.lang.Object

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

    • Reciprocal

      public Reciprocal()
  • Method Details

    • of

      public static double of​(double input)
      Get the reciprocal of a specified number.
      Parameters:
      input - the number to get the reciprocal of.
      Returns:
      the number's reciprocal.
    • of

      public static double of​(double input, double scale)
      Get the reciprocal of a specified number and multiply it by the provided scale coefficient.
      Parameters:
      input - the number to get the reciprocal of.
      scale - the number to multiply by.
      Returns:
      the reciprocal of the specified number, multiplied by the provided scale value.