public class CollisionFunctionLinear extends Object implements CollisionFunction
a * input + b
Constructor and Description |
---|
CollisionFunctionLinear(double a,
double b)
Create a linear function.
|
Modifier and Type | Method and Description |
---|---|
double |
compute(double input)
Compute the collision from input value.
|
double |
getA()
Get the factor value.
|
double |
getB()
Get the offset value.
|
CollisionFunctionType |
getType()
Get the collision function type.
|
public CollisionFunctionLinear(double a, double b)
a
- The multiplication factor.b
- The offset value.public double getA()
public double getB()
public double compute(double input)
CollisionFunction
compute
in interface CollisionFunction
input
- The input value.public CollisionFunctionType getType()
CollisionFunction
getType
in interface CollisionFunction
Copyright © 2016 Byron 3D Games Studio. All rights reserved.