I'm trying to understand the building codes used in the US and specifically NJ for the clear space in front of a shower or bathtub. This is for a residential single family home.
I remember reading that there needs to be 24" of clear floor space for the tub. It does not specify if the entire length of the tub needs to be clear. For a shower you just need 22" wide by the door. For an accessible bathroom you only need 48" along the tub.
There are a lot of bathroom designs I see that have either a toilet or a sink next to the tub.
Can you put a toilet or sink next to a bathtub so that the center of the toilet/sink is at least 15" away from the edge of the bathtub even though it's in the clear space? Or does the clear space need to be the entire length of the tub? Does it matter if the toilet is next to the controls or not?
If not what are the minimum clearances for the dimensions shown below?

