Skip to content

Commit

Permalink
Update MathUtils.java
Browse files Browse the repository at this point in the history
Minor chances add vector 3d truncate
  • Loading branch information
Rafael-Dev-21 authored Oct 14, 2020
1 parent bc1b1f8 commit c69a9b1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/java/br/com/rafael/math/MathUtils.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package br.com.rafael.math;
/**
* Copyright© 2020 Victor Rafael Pereira Alves This file is part of MathUtils.
* Copyright© 2020 Victor Rafael Pereira Alves
*
* <p>This file is part of MathUtils.
*
* <p>MathUtils is free software: you can redistribute it and/or modify it under the terms of the
* Lesser GNU General Public License as published by the Free Software Foundation, either version 3
Expand All @@ -13,7 +15,9 @@
* <p>You should have received a copy of the Lesser GNU General Public License along with MathUtils.
* If not, see &#60; https://www.gnu.org/licenses/ &#62;.
*/

import br.com.rafael.math.vector.Vector2D;
import br.com.rafael.math.vector.Vector3D;

public final class MathUtils {

Expand Down Expand Up @@ -85,4 +89,8 @@ public static final double resize(
public static final Vector2D truncate(Vector2D vector, double size) {
return vector.size() > size ? vector.resize(size) : vector;
}

public static final Vector3D truncate(Vector3D vector, double size) {
return vector.size() > size ? vector.resize(size) : vector;
}
}

0 comments on commit c69a9b1

Please sign in to comment.