SimpleJavaEngine/src/main/java/speiger/src/coreengine/math/vector/shorts/Vecs.java

31 lines
1023 B
Java

package speiger.src.coreengine.math.vector.shorts;
import java.nio.ShortBuffer;
import speiger.src.coreengine.math.vector.Vec;
import speiger.src.coreengine.math.vector.bytes.Vecb;
import speiger.src.coreengine.math.vector.doubles.Vecd;
import speiger.src.coreengine.math.vector.floats.Vecf;
import speiger.src.coreengine.math.vector.ints.Veci;
import speiger.src.coreengine.math.vector.longs.Vecl;
public interface Vecs extends Vec {
public Vecs set(short value);
public Vecs add(short value);
public Vecs sub(short value);
public Vecs multiply(short value);
public Vecs devide(short value);
public Vecs clamp(short min, short max);
public Vecs clamp(short min, short max, int filter);
public long lengthSquared();
public default double length() { return Math.sqrt(lengthSquared()); }
public Vecs store(ShortBuffer buffer);
public Vecs load(ShortBuffer buffer);
public short[] asArray();
public Vecb asByte();
public Veci asInt();
public Vecl asLong();
public Vecf asFloat();
public Vecd asDouble();
}